Overview
The "Zalo Message Trigger" node listens for incoming messages on the Zalo platform, a popular messaging app. It triggers workflows when new messages arrive either from individual users or groups, depending on configuration. This node is useful for automating responses, logging conversations, or integrating Zalo messages with other systems.
Common scenarios include:
- Automatically processing user inquiries received via Zalo.
- Monitoring group chats for specific keywords or events.
- Creating notifications or alerts based on incoming messages.
Properties
| Name | Meaning |
|---|---|
| Event Types | Types of messages to listen for. Options: User Messages (messages from individual users), Group Messages (messages from groups). Default listens to both. |
| Self Listen | Whether to allow listening to messages sent by yourself. Boolean value (true/false). Defaults to false. |
Output
The node outputs JSON data representing the incoming message event. The output structure includes a message field containing details about the received message from Zalo. This can include sender information, message content, timestamps, and other metadata as provided by the Zalo API.
No binary data output is produced by this node.
Example output JSON structure:
[
{
"message": {
// message details from Zalo event
}
}
]
Dependencies
- Requires valid Zalo API credentials including authentication cookies, device IMEI, and user agent string.
- Uses an external Zalo SDK/library (
zca-js) to connect and listen for messages. - Needs proper webhook URL configuration in n8n to receive incoming message events.
- Requires internet access to communicate with Zalo servers.
Troubleshooting
- Connection failures: If the node throws "Zalo connection failed," verify that the provided credentials are correct and have not expired. Ensure the cookie, IMEI, and user agent values are valid.
- No messages received: Confirm that the webhook URL is correctly set up and publicly accessible. Also, check that the selected event types match the expected incoming messages.
- Self Listen not working: If you want to receive your own sent messages, ensure the "Self Listen" property is enabled; otherwise, those messages will be ignored.
- Unexpected errors: Check the node logs for detailed error messages. Network issues or changes in the Zalo API may require updating credentials or the SDK version.