Zalo Send Message icon

Zalo Send Message

Gửi tin nhắn qua API Zalo sử dụng kết nối đăng nhập bằng cookie

Actions2

Overview

This node is designed to send message status updates through the Zalo messaging platform. It supports sending typing indicators or other message-related statuses to a specified thread, which can be either a user or a group conversation. This functionality is useful in scenarios where you want to simulate or notify that a user is typing or update the message state programmatically within Zalo chats.

Practical examples include:

  • Indicating to a chat participant that a message is being composed (typing indicator).
  • Sending custom status updates related to messages in a group or individual chat.
  • Automating interaction flows where message status feedback is required for better user experience.

Properties

Name Meaning
Thread ID The unique identifier of the thread (chat) where the message status will be sent.
Type The type of the message recipient: 0 for user, 1 for group.

Output

The node outputs an array of JSON objects, each representing the result of sending a message status for an input item. Each output object contains:

  • success: Boolean indicating if the operation was successful.
  • response: The raw response from the Zalo API after sending the status (present when applicable).
  • threadId: The ID of the thread where the status was sent.
  • threadType: The type of the thread (user or group).
  • messageContent: The content of the message status sent (if applicable).
  • message: A simple "OK" message for some operations.
  • error: Error message string if the operation failed.

No binary data output is produced by this node.

Dependencies

  • Requires valid Zalo API credentials including a cookie, device IMEI, and user agent string.
  • Uses an external Zalo API client library internally to interact with Zalo services.
  • The node expects these credentials to be configured properly in n8n before execution.

Troubleshooting

  • Zalo login error: If the node throws a login error, verify that the provided credentials (cookie, IMEI, user agent) are correct and have not expired.
  • Thread ID issues: Ensure the Thread ID corresponds to an existing chat on Zalo; invalid IDs will cause failures.
  • Type mismatch: The Type property must be correctly set to 0 (user) or 1 (group). Incorrect values may lead to unexpected behavior.
  • API errors: Network issues or changes in Zalo's API might cause errors. Check logs for detailed error messages.
  • Missing credentials: The node requires proper authentication credentials; missing or misconfigured credentials will prevent operation.

Links and References

Discussion