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 based on user configuration. This node is beneficial in scenarios where you want to automate workflows triggered by new messages on Zalo, such as customer support automation, chatbots, or monitoring group conversations.
For example, you could use this node to:
- Automatically respond to user messages with predefined answers.
- Log all group chat messages into a database for analysis.
- Trigger notifications or other workflows when specific types of messages arrive.
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 field with detailed information about the message event captured by the webhook.
Example output JSON structure:
{
"message": {
// Detailed message event data from Zalo API
}
}
No binary data output is produced by this node.
Dependencies
- Requires an API key credential to connect to the Zalo platform.
- Uses the
zca-jslibrary to handle Zalo API interactions and message listening. - Requires proper configuration of webhook URL in n8n to receive POST requests from the Zalo listener.
- The node depends on valid Zalo credentials including cookie, IMEI, and user agent strings to authenticate and establish the connection.
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 so Zalo can send events to it.
- Listening to self messages: If you do not receive messages sent by yourself, check the "Self Listen" property; it must be enabled to capture your own messages.
- Credential errors: Make sure the API key credential is properly configured in n8n and linked to this node.
Links and References
- Zalo Official Developer Documentation
- n8n Webhook Documentation
- zca-js GitHub Repository (Note: Replace with actual repo if available)