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 for automating workflows that respond to new messages, such as customer support bots, notification systems, or analytics pipelines.
Typical use cases include:
- Automatically processing and responding to user messages.
- Monitoring group conversations for specific keywords or commands.
- Logging or analyzing message data for business insights.
For example, a business could use this node to listen for customer inquiries sent via Zalo and automatically create support tickets or send predefined replies.
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 the bot itself. Boolean value: true (enable), false (disable). |
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
zca-jslibrary to handle Zalo API interactions and message listening. - Requires proper configuration of webhook URL in n8n to receive POST requests from Zalo.
- The node depends on valid authentication cookies, device IMEI, and user agent strings stored in credentials to establish connection.
Troubleshooting
- Connection failures: If the node throws "Zalo connection failed," verify that the provided credentials are correct and contain valid cookie, IMEI, and user agent information.
- No messages received: Ensure that the webhook URL is correctly set up and accessible by Zalo. Also, confirm that the selected event types match the expected message sources.
- Self Listen not working: If messages sent by the bot itself are not triggering the workflow despite enabling "Self Listen," check if the Zalo API supports this feature for your account and that the node parameter is properly set.
- Credential errors: The node requires a valid API credential; missing or invalid credentials will cause errors during webhook creation.
Links and References
- Zalo Official Developer Documentation
- n8n Webhook Documentation
- zca-js GitHub Repository (for the Zalo API client used)