Actions12
- Zalo Send Message Actions
- Zalo Text To Speech Actions
Overview
The "Zalo Send Message" node enables sending various types of messages through the Zalo messaging platform using its API. Specifically, the "Gửi tin nhắn thoại" (Send Voice Message) operation allows users to send voice messages in .m4a format to either individual users or groups on Zalo by providing a publicly accessible URL to the audio file.
This node is beneficial for automating communication workflows where voice messages are preferred or required, such as customer support follow-ups, notifications, or personalized greetings. For example, a business could automatically send a voice message confirmation after a customer places an order.
Properties
| Name | Meaning |
|---|---|
| ID cuộc trò chuyện / Thread ID | The unique identifier of the conversation (user or group) where the voice message will be sent. This is required. |
| Loại cuộc trò chuyện | The type of conversation: "Cá nhân" (Individual user) or "Nhóm" (Group). Options: 0 (Individual), 1 (Group). Default is 0. |
| URL Tin nhắn thoại (M4A) | Publicly accessible URL of the voice message audio file in .m4a format. This is required. |
Output
The node outputs a JSON object containing:
success: Boolean indicating if the voice message was sent successfully.response: The raw response from the Zalo API after sending the voice message.threadId: The ID of the conversation where the message was sent.threadType: The type of the conversation (user or group).
No binary data output is produced by this operation.
Example output JSON structure:
{
"success": true,
"response": { /* Zalo API response object */ },
"threadId": "123456789",
"threadType": 0
}
Dependencies
- Requires valid Zalo API credentials with authentication via cookie, IMEI, and user agent.
- The node uses the Zalo API client library internally to perform login and send messages.
- The voice message must be hosted at a publicly accessible URL in .m4a format.
- No additional environment variables are explicitly required beyond the configured Zalo API credentials.
Troubleshooting
Common issues:
- Missing or invalid Zalo API credentials will cause initialization failure.
- Providing an invalid or inaccessible voice URL will result in errors when sending the voice message.
- Incorrect thread ID or thread type may cause the message not to be delivered.
Error messages:
"Failed to initialize Zalo API. Check your credentials."— Indicates that the node could not authenticate with Zalo. Verify the API credentials and ensure they are correct."Voice URL is required."— The voiceUrl property was not provided or empty. Provide a valid public URL to the .m4a file.- Errors related to network or API failures will include the error message from the Zalo API response.
Resolution tips:
- Ensure the voice file URL is publicly accessible without authentication.
- Double-check the thread ID corresponds to an existing user or group.
- Confirm the conversation type matches the thread ID (user vs group).
- Review API credential validity and refresh if expired.
Links and References
- Zalo Official API Documentation
- Zalo Messaging Platform
- n8n Documentation (for general usage guidance)