Actions25
- Message Actions
- Friend Actions
- Get 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 options, attachments, mentions, quoted messages, and message urgency levels. This node is beneficial in automating communication workflows such as customer support, notifications, marketing campaigns, or group announcements on Zalo.
Practical examples include:
- Sending a personalized notification to a user with styled text and attachments.
- Posting an urgent announcement to a group chat with mentions of specific members.
- Quoting a previous message while replying to maintain context.
Properties
| Name | Meaning |
|---|---|
| User/Group Id | The ID of the Zalo user or group to which the message will be sent. |
| Message | The content of the message to send. Optional for some operations but typically contains the main text body. |
| Thread Type | Specifies whether the target is a User (0) or a Group (1). |
| Attachments | Collection of file paths to attach to the message. Each attachment requires a path, which can be a local file path (e.g., /files/example.txt) or a URL (e.g., https://example.com/image.png). |
| Attachments (URLs) | A comma-separated string listing URLs or file paths for attachments. Alternative to the fixed collection above. |
| Styles | Collection of style objects defining text styles and colors applied to parts of the message. Styles include Bold, Italic, Underline, StrikeThrough, various colors (Red, Orange, Yellow, Green), font sizes (Small, Big), and list/indent formats. Each style specifies start index and length. |
| Urgency | Priority level of the message: Default (0), Important (1), or Urgent (2). |
| Mentions | Collection of mention objects specifying users to mention within the message. Each mention includes position, user ID, and length of the mention text. |
| Quote Message | JSON object representing a quoted message to include in the new message, providing context or reference. |
| Message Lifetime | Time-to-live (TTL) for the message, indicating how long the message should exist before expiring. |
Output
The node outputs an array of results corresponding to each input item processed. Each result contains a json field with details about the sent message, including:
- Confirmation of success or failure.
- Metadata about the message sent.
- Any returned data from the Zalo API related to the message.
If attachments are included, the node handles uploading or referencing these files appropriately. Binary data output is not explicitly indicated, so the output primarily consists of JSON metadata.
Dependencies
- Requires access to the Zalo API, which implies the need for an API key or authentication token configured in n8n credentials.
- Uses internal helper classes and methods for handling file uploads, message formatting, and API requests.
- Node depends on the ability to read local files if attachments are specified by local paths.
- Network access is required for sending messages and fetching remote attachments if URLs are used.
Troubleshooting
- Invalid User/Group ID: If the provided thread ID does not correspond to a valid user or group, the API call will fail. Verify the ID correctness.
- Attachment Errors: Incorrect file paths or inaccessible URLs for attachments may cause upload failures. Ensure paths are correct and accessible.
- Authentication Failures: Missing or invalid API credentials will prevent message sending. Confirm that the API key/token is correctly set up in n8n.
- Message Formatting Issues: Incorrect style indices or lengths may cause errors or unexpected formatting. Validate style ranges against the message length.
- Quota or Rate Limits: Exceeding Zalo API limits may result in temporary blocks or errors. Monitor usage and implement retries or delays if necessary.
- Error Logging: The node logs errors internally and returns error details in the output. Review these messages for debugging.
Links and References
- Zalo Official API Documentation — For detailed API capabilities and requirements.
- n8n Documentation — For general guidance on creating and using custom nodes.
- Zalo Messaging Features — Specifics on message types, attachments, and formatting.
Note: Internal credential names and service identifiers have been generalized to comply with security best practices.