Overview
This node listens for various group-related events occurring within Zalo groups. It acts as a trigger that activates workflows when specific group activities happen, such as members joining or leaving, admins being added or removed, group settings updated, topics pinned or unpinned, and more.
Common scenarios where this node is beneficial include:
- Automating notifications or logging when members join or leave a group.
- Monitoring administrative changes like adding or removing group admins.
- Tracking updates to group settings or pinned topics.
- Responding to reminders or topic-related events in group discussions.
For example, you could use this node to automatically send a welcome message whenever a new member joins a group or to log all changes made by group admins for audit purposes.
Properties
| Name | Meaning |
|---|---|
| Group Event Types | Types of group events to listen for. Options include: Join Request, Join, Leave, Remove Member, Block Member, Update Setting, Update, New Link, Add Admin, Remove Admin, New Pin Topic, Update Pin Topic, Reorder Pin Topic, Update Board, Remove Board, Update Topic, Unpin Topic, Remove Topic, Accept Remind, Reject Remind, Remind Topic. Multiple can be selected. |
| Self Listen | Whether to listen to events triggered by yourself (boolean). If false, events caused by the user running the workflow are ignored. |
| Specific Group IDs | Comma-separated list of specific group IDs to monitor. If left empty, the node monitors all groups accessible by the authenticated user. |
Output
The node outputs JSON data representing the group event received. The structure includes:
eventType: A string indicating the type of event ("group_event").groupEvent: An object containing:type: Numeric code of the event type.typeName: String name of the event type.threadId: The ID of the group where the event occurred.isSelf: Boolean indicating if the event was triggered by the authenticated user.data: Additional event-specific data payload.timestamp: Unix timestamp of when the event was received.
Example output JSON:
{
"eventType": "group_event",
"groupEvent": {
"type": 1,
"typeName": "JOIN",
"threadId": "123456789",
"isSelf": false,
"data": { /* event-specific details */ },
"timestamp": 1680000000000
}
}
The node does not output binary data.
Dependencies
- Requires an API key credential to connect with the Zalo platform.
- Uses the external
zca-jslibrary to interact with Zalo's API and listen for group events. - Needs proper configuration of credentials including cookie, IMEI, and user agent strings for authentication.
- The node sets up a webhook URL to receive event notifications from the Zalo listener.
Troubleshooting
- No credentials found: Ensure that valid Zalo API credentials are configured in n8n before activating the node.
- Zalo Group Event connection failed: This error indicates issues during login or listener setup. Verify that the cookie, IMEI, and user agent values are correct and have not expired.
- Webhook not receiving events: Confirm that the webhook URL is publicly accessible and correctly registered with the Zalo listener.
- Events not triggering: Check that the selected group event types match the actual events occurring, and if specific group IDs are set, ensure the events come from those groups.
- Listening to self-triggered events: If you want to capture events triggered by your own actions, enable the "Self Listen" property; otherwise, these events will be ignored.
Links and References
- Zalo Official Developer Documentation
- n8n Webhook Documentation
- zca-js GitHub Repository (for the underlying Zalo API client used)