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, making it useful for automating workflows that respond to new messages on Zalo.
Common scenarios include:
- Automatically processing or logging user messages received on Zalo.
- Triggering notifications or other actions when group messages arrive.
- Building chatbots or customer support automation that reacts instantly to incoming messages.
For example, you could use this node to listen for user messages and then forward them to a CRM system, or monitor group chats for specific keywords and trigger alerts.
Properties
| Name | Meaning |
|---|---|
| Event Types | Types of messages to listen for. Options: User Messages (listen to messages from users), Group Messages (listen to messages from groups). Multiple selections allowed. |
| Self Listen | Whether to allow listening to messages sent by yourself. Boolean value: true or false. |
Output
The node outputs JSON data representing the incoming message event received from Zalo. The output structure contains a message object with details about the message event captured by the webhook.
Example output JSON structure:
{
"message": {
// message details as provided by Zalo's API
}
}
No binary data output is produced by this node.
Dependencies
- Requires an API key credential to connect to the Zalo platform.
- Uses the external
zca-jslibrary to handle Zalo API interactions and message listening. - Needs proper configuration of the webhook URL in n8n to receive incoming message events.
- Requires valid Zalo credentials including cookie, IMEI, and user agent information for authentication.
Troubleshooting
- Connection failures: If the node throws "Zalo connection failed," verify that the provided credentials are correct and have not expired.
- No API instance found: This error indicates invalid or incomplete credentials; ensure all required authentication details are supplied.
- Webhook not triggered: Confirm that the webhook URL is correctly set up and publicly accessible so Zalo can send events.
- Listening to self messages: If you do not receive messages sent by yourself, check the "Self Listen" property and enable it if needed.
Links and References
- Zalo Official Developer Documentation
- n8n Webhook Documentation
- zca-js GitHub Repository (for the Zalo API client used)