Actions10
- User Action Actions
- Message Action Actions
Overview
The node integrates with the Zalo Web platform to send various types of messages and perform user-related actions. Specifically, for the Message Action resource with the Send Voice operation (though the provided code snippet focuses on sending messages including attachments like audio, video, documents, etc.), it allows sending voice messages or other media files to a target chat or user identified by their unique ID.
This node is beneficial in scenarios where automated communication via Zalo is needed, such as:
- Sending voice notes or multimedia messages to customers or team members.
- Automating notifications or alerts with audio content.
- Integrating Zalo messaging into workflows that require rich media support.
Practical example: Automatically sending a voice message to a customer when an order status changes, using a pre-recorded audio file stored in binary data.
Properties
Name | Meaning |
---|---|
User ID | Unique identifier for the target chat or username. Used to specify the recipient of the message. |
Binary File | Boolean flag indicating whether the message content should be taken from a binary field. |
Input Binary Field | The name of the binary property containing the file data to upload (e.g., voice message audio). |
Note: The "User ID" property is required for identifying the recipient. The "Binary File" property determines if the message content comes from binary data, and if true, "Input Binary Field" specifies which binary field to use.
Output
The node outputs an array of JSON objects, each containing a data
field with the response from the Zalo API after sending the message or performing the action. The structure is:
{
"json": {
"data": { /* response object from Zalo API */ }
}
}
If binary data is involved (e.g., sending voice or other media files), the node handles uploading the binary content but does not output binary data itself. Instead, it returns metadata or confirmation about the sent message.
Dependencies
- Requires an API key credential for authenticating with the Zalo Web API.
- Uses internal helper functions to handle binary data conversion and temporary file management.
- Relies on external libraries for streaming and file system operations.
- Requires proper configuration of the Zalo Web API credentials within n8n.
Troubleshooting
Common Issues:
- Incorrect or missing User ID will cause the message sending to fail.
- If "Binary File" is set to true but the specified binary field does not exist or is empty, the node will not be able to upload the media.
- Network issues or invalid API credentials can lead to authentication errors.
Error Messages:
- Errors related to file download or upload failures may occur if URLs are invalid or inaccessible.
- Authentication errors if the API key or cookie is invalid or expired.
- Parsing errors if input parameters are malformed.
Resolutions:
- Verify the User ID is correct and corresponds to a valid Zalo user or chat.
- Ensure the binary data field contains valid media data before execution.
- Check API credentials and refresh tokens if necessary.
- Confirm network connectivity and access permissions.