Overview
The Zalo Message Trigger node listens for incoming messages on the Zalo platform and triggers workflows in n8n when such events occur. It is designed to act as a webhook-based trigger, allowing you to automate actions in response to messages received from users or groups on Zalo.
Common scenarios:
- Automatically process or respond to user messages sent to your Zalo account.
- Monitor group chats for specific keywords or activities and trigger workflows accordingly.
- Integrate Zalo messaging with other systems (e.g., CRM, support ticketing) by forwarding message data.
Practical examples:
- When a customer sends a message to your Zalo business account, automatically create a support ticket.
- Log all group chat messages into a database for compliance or analytics purposes.
Properties
Name | Type | Meaning |
---|---|---|
Event Types | multiOptions | Types of messages to listen for. Options include: - User Messages: Listen for messages from individual users. - Group Messages: Listen for messages from group chats. |
Output
The node outputs a JSON object containing the message data received from Zalo. The structure of the output is determined by the Zalo API's message event payload, which is passed through as-is.
Example output:
{
"message": {
// ... message fields as provided by Zalo
}
}
- The exact fields depend on the Zalo message event but typically include sender information, message content, timestamps, etc.
Note: This node does not output binary data.
Dependencies
- External Service: Requires access to the Zalo platform and valid Zalo credentials (cookie, IMEI, user agent).
- Credentials: You must configure a credential named "zaloApi" in n8n, providing the necessary authentication details.
- n8n Configuration: No special environment variables are required beyond standard credential setup.
Troubleshooting
Common issues:
Invalid Credentials: If the Zalo credentials are missing or incorrect, the node will throw an error:
"No credentials found" or "No API instance found. Please make sure to provide valid credentials."- Resolution: Double-check that your Zalo credentials (cookie, IMEI, user agent) are correct and properly configured in n8n.
Connection Failure: If the node cannot connect to Zalo, it will throw:
"Zalo connection failed"- Resolution: Ensure network connectivity and that the credentials are up-to-date.
Webhook Not Triggering: If no messages are being received, verify that:
- The workflow is active.
- The correct event types are selected.
- The Zalo account is receiving messages as expected.