Overview
This node acts as a trigger that listens 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, depending on configuration. This node is useful in scenarios where you want to automate workflows based on new messages received on Zalo, such as customer support automation, chatbots, or notification systems.
For example, you could use this node to:
- Trigger a workflow whenever a user sends a message to your Zalo account.
- Listen for messages in group chats and process them automatically.
- Filter out messages sent by yourself if desired, to avoid triggering workflows on your own messages.
Properties
| Name | Meaning |
|---|---|
| Event Types | Types of messages to listen for. Options: "User Messages" (messages from individual users), "Group Messages" (messages from groups). You can select one or both. |
| Self Listen | Whether to allow listening to messages sent by yourself. Boolean value: true or false. |
Output
The node outputs JSON data representing the message event received from Zalo. The output structure contains a message object with details about the incoming message. This includes all relevant information provided by the Zalo API about the message event.
The output is delivered as an array of JSON objects, each corresponding to a single message event captured by the webhook.
No binary data output is produced by this node.
Dependencies
- Requires valid Zalo API credentials including authentication cookies, device IMEI, and user agent string.
- Uses an external Zalo SDK/library (
zca-js) to handle connection and message listening. - Needs a webhook URL configured in n8n to receive POST requests when messages arrive.
- Requires proper setup of credentials in n8n to authenticate with Zalo's API.
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 message sources.
- Listening to self messages: If you do not want the node to trigger on messages sent by yourself, ensure the "Self Listen" property is set to false.
- Credential errors: The node requires valid credentials; missing or invalid credentials will cause errors during activation.