Zalo Send Message
AI-generatedOverview
This node sends messages via the Zalo API using a connection authenticated by a cookie. It is useful for automating message sending to Zalo users or groups, supporting features like message quoting, mentions, urgency levels, and attachments. For example, it can be used to send notifications, alerts, or conversational messages in Zalo chats programmatically.
Use Case Examples
- Sending a text message to a specific user thread with normal urgency.
- Sending an urgent message to a group thread with quoted content and user mentions.
- Sending a message with one or more image attachments to a user or group thread.
Properties
| Name | Meaning |
|---|---|
| Thread ID | The ID of the Zalo thread (user or group) to which the message will be sent. |
| Type | The type of the message recipient, either a user (0) or a group (1). |
| Message | The content of the message to be sent. |
| Urgency | The urgency level of the message, which can affect how it is displayed or handled. |
| Quote Message | Optional quoted message details to include in the sent message, such as message ID, sender ID, and content. |
| Mentions | Optional user mentions within the message, specifying user ID, position, and length of the mention. |
| Attachments | One or more image or file attachments to include with the message, specified by public URLs. |
Output
JSON
success- Indicates if the message was sent successfully (true or false).response- The raw response from the Zalo API after sending the message.threadId- The ID of the thread to which the message was sent.threadType- The type of the thread (user or group).messageContent- The content and metadata of the sent message, including text, urgency, quotes, mentions, and attachments.
Dependencies
- Zalo API accessed via a cookie-based login using credentials including cookie, IMEI, and user agent.
Troubleshooting
- If the node fails to initialize the Zalo API, check that the provided cookie and credentials are valid and not expired.
- Errors sending messages may occur if the thread ID is incorrect or the API rejects the message content; verify thread IDs and message formatting.
- Attachment URLs must be publicly accessible; otherwise, the file cannot be downloaded and attached.
- If sending typing events fails, it logs an error but continues; this does not block message sending.
- Use the 'Continue On Fail' option to handle errors gracefully and continue processing other items.