Actions22
- Get Actions
- Message Actions
- Friend Actions
- Group Actions
- Tool Actions
Overview
This node is designed to send messages through the Zalo platform, targeting either individual users or groups. It supports sending text messages with rich formatting styles, attachments (files or URLs), mentions of other users, quoted messages, and message urgency levels. Additionally, it allows setting a message lifetime (TTL).
Common scenarios for this node include:
- Automating customer support replies by sending personalized messages to users or groups.
- Broadcasting announcements or updates to specific user groups.
- Sending multimedia content such as images or documents alongside text.
- Highlighting important messages using different text styles and urgency flags.
- Referencing previous messages via quoting.
Practical example: A business could use this node to automatically send order confirmation messages with attached invoices and highlight key details in bold or colored text, mentioning the customer explicitly.
Properties
| Name | Meaning |
|---|---|
| User/Group Id | The ID of the Zalo user or group to which the message will be sent. |
| Message | The textual content of the message to send. Optional if attachments are provided. |
| Thread Type | Specifies whether the target is a single user (User) or a group (Group). Options: User (0), Group (1). |
| Attachments (Paths) | Collection of file paths or URLs pointing to attachments to include in the message. Each attachment requires a path string, e.g., /files/example.txt or https://example.com/image.png. Multiple attachments allowed. |
| Attachments (URLs) | Alternative way to specify attachments as a comma-separated string of URLs or file paths. |
| Styles | Collection of style objects defining text formatting within the message. Styles include options like Bold, Italic, Underline, StrikeThrough, colors (Red, Orange, Yellow, Green), font sizes (Small, Big), and list types (unordered, ordered). Each style specifies start index and length. |
| Urgency | Sets the priority level of the message. Options: Default (0), Important (1), Urgent (2). |
| Mentions | Collection of mention objects specifying users to mention in the message. Each mention includes position (index in message), user ID, and length of the mention text. |
| Quote Message | JSON object representing a quoted message to include as a reference in the new message. |
| Message Lifetime | Number indicating how long (in seconds) the message should exist before expiring. Optional. |
Output
The node outputs an array of results corresponding to each input item processed. Each result contains a json field with the response data from the Zalo API after sending the message. This typically includes status information about the sent message, such as message ID, timestamps, and any error details if applicable.
If attachments are included, the node handles uploading or referencing them appropriately, but binary data is not directly output by the node.
Dependencies
- Requires an active connection to the Zalo messaging platform via an API key or authentication token configured in n8n credentials.
- Uses internal helper classes and methods to handle file uploads, message formatting, and API requests.
- May require access to local file system or external URLs for attachments.
- No additional external services beyond Zalo API are needed.
Troubleshooting
- Invalid User/Group ID: If the specified
threadIddoes not correspond to a valid user or group, the API call will fail. Verify the ID correctness. - Missing Required Fields: The node requires
threadIdandthreadTypeat minimum. Omitting these will cause errors. - Attachment Upload Failures: If attachment paths are incorrect or inaccessible, the upload will fail. Ensure files exist and URLs are reachable.
- API Authentication Errors: Ensure the API key or token credential is correctly set up and has permissions to send messages.
- Message Content Issues: Overly long messages or invalid style indices may cause errors. Validate message length and style ranges.
- Quota Limits: Exceeding Zalo API rate limits or quotas can result in temporary failures.
Common error messages usually include HTTP status codes and descriptive messages from the Zalo API. Review logs and error details returned in the node's output for diagnosis.
Links and References
- Zalo Official API Documentation
- n8n Documentation on Creating Nodes
- Zalo Messaging Platform Overview
Note: Internal variable names, credential type identifiers, or obfuscated code details have been omitted to comply with security and privacy guidelines.