Overview
This node acts as a trigger to listen for incoming messages on the Zalo platform, a popular messaging app. It is designed to capture real-time message events either from individual users or group chats. This functionality is useful in scenarios such as automating responses, logging conversations, or integrating Zalo messages into other workflows or systems.
For example, you could use this node to:
- Automatically respond to user inquiries sent via Zalo.
- Monitor group chat activity and trigger alerts based on specific keywords.
- Collect and analyze customer feedback received through Zalo messages.
Properties
| Name | Meaning |
|---|---|
| Event Types | Types of messages to listen for. Options: User Messages (messages from individual users), Group Messages (messages from groups). Multiple selections allowed. |
| Self Listen | Whether to listen to messages sent by yourself (the authenticated account). Boolean value: true or false. |
Output
The node outputs JSON data representing the incoming message event captured from Zalo. The output structure contains a message object with details about the message received. This includes all relevant information provided by the Zalo API about the message event.
No binary data output is produced by this node.
Example output JSON structure:
[
{
"message": {
// message details as received from Zalo webhook
}
}
]
Dependencies
- Requires an API key credential to authenticate with the Zalo platform.
- Uses the
zca-jslibrary internally to handle Zalo API interactions and message listening. - The node sets up a webhook endpoint to receive message events from Zalo.
- Requires proper configuration of the webhook URL in Zalo developer settings to forward events to n8n.
Troubleshooting
- Connection failures: If the node cannot connect to Zalo, ensure that the API credentials (cookie, IMEI, user agent) are valid and have not expired.
- Webhook not triggering: Verify that the webhook URL configured in Zalo matches the one generated by the node and that it is publicly accessible.
- No messages received: Check that the selected event types match the actual message sources and that "Self Listen" is enabled if you want to capture your own sent messages.
- Error messages related to missing credentials: Make sure to provide the required API authentication token or cookie in the node's credential settings.
Links and References
- Zalo Official Developer Documentation
- n8n Webhook Documentation
- zca-js GitHub Repository (for the underlying Zalo API client used)