Actions2
- Zalo Send Message Actions
Overview
The Zalo Send Message node allows users to send messages through the Zalo platform using its API, authenticated via a cookie-based login. It supports sending text messages to individual users or groups, with options for message urgency, quoting previous messages, mentioning users, and attaching images by URL.
This node is beneficial in scenarios such as:
- Automating customer support replies on Zalo.
- Broadcasting announcements or alerts to user groups.
- Integrating Zalo messaging into workflows that require notifications or conversational interactions.
For example, a business could use this node to automatically send order status updates to customers or notify a team group about urgent issues.
Properties
| Name | Meaning |
|---|---|
| Thread ID | The ID of the conversation thread where the message will be sent. |
| Type | The type of message recipient: either a single User or a Group. |
| Message | The text content of the message to send. |
| Urgency | The urgency level of the message; options are Default, Important, or Urgent. |
| Quote Message | Allows replying to a specific message by quoting it. Includes Message ID, Sender ID, and Content. |
| Mentions | Specifies users to mention within the message, including their user ID, position, and length. |
| Attachments | One or more image attachments specified by public URLs. |
Output
The node outputs an array of JSON objects, each representing the result of sending a message for each input item. Each output JSON contains:
success: Boolean indicating if the message was sent successfully.response: The raw response from the Zalo API after sending the message.threadId: The ID of the thread where the message was sent.threadType: Numeric code indicating whether the message was sent to a user (0) or group (1).messageContent: The full message object sent, including text, urgency, quotes, mentions, and attachments.
If attachments are included, the node handles downloading and cleaning up temporary image files internally; binary data is not directly outputted.
Dependencies
- Requires valid Zalo API credentials configured in n8n, including a cookie string, device IMEI, and user agent string.
- Uses the external
zca-jslibrary to interact with the Zalo API. - Utilizes helper functions to download and remove image attachments from provided URLs.
- Requires network access to Zalo's API endpoints and any image URLs used for attachments.
Troubleshooting
Failed to initialize Zalo API. Check your credentials.
This error indicates invalid or expired authentication credentials. Verify that the cookie, IMEI, and user agent values are correct and up to date.Zalo login error: followed by a message
Could be caused by network issues or incorrect credential format. Ensure stable internet connection and proper credential setup.Cannot send typing event (logged but does not stop execution)
Sending a "typing" indicator failed, possibly due to API limitations or permissions. This does not block message sending.If the node fails but
Continue On Failis enabled, it returns an error object per item instead of stopping the workflow.Attachment URLs must be publicly accessible; otherwise, image download will fail.
Links and References
- Zalo Official API Documentation (for general API reference)
- n8n Documentation (for configuring credentials and using nodes)
- zca-js GitHub Repository (library used for Zalo API interaction) (Note: replace with actual repo if known)