Zalo User Trigger
AI-generatedOverview
This node listens for incoming events from the Zalo messaging platform related to a user account. It can trigger workflows when new messages, images, files, or typing notifications are received. This is useful for automating responses, logging conversations, or integrating Zalo communications into other systems.
Common scenarios include:
- Automatically processing and responding to new messages or media.
- Monitoring specific users’ activity on Zalo.
- Triggering alerts or actions when someone starts typing.
For example, you could use this node to start a workflow that saves all incoming images to cloud storage or notifies a team chat when a particular user sends a message.
Properties
| Name | Meaning |
|---|---|
| Events to Listen | Select which types of events to listen for: New Message, New Image, New File, User Typing |
| Filter by User | Enable filtering so the trigger only fires for specific users |
| User IDs | Comma-separated list of user IDs to listen for (only used if "Filter by User" is enabled) |
Output
The node outputs JSON objects representing the event data it receives. The structure varies depending on the event type:
Message, Image, File events:
{ "messageId": "string", "messageType": "message" | "image" | "file", "fromUid": "string", "fromDisplayName": "string", "toUid": "string", "message": "string", "timestamp": "ISO8601 timestamp", "isGroup": boolean, "groupId": "string|null", "rawData": { /* original event data */ }, // For image events: "imageUrl": "string", "imageThumb": "string", // For file events: "fileUrl": "string", "fileName": "string", "fileSize": number }Typing events:
{ "messageType": "typing", "fromUid": "string", "fromDisplayName": "string", "timestamp": "ISO8601 timestamp", "isTyping": boolean }Error events (e.g., connection errors):
{ "error": "string", "timestamp": "ISO8601 timestamp", "type": "connection_error" }
The node does not output binary data.
Dependencies
- Requires an API key credential with session authentication including a valid cookie and user agent string.
- Uses an external Zalo API client library to connect and listen for events.
- The node expects the session cookie to be valid and able to authenticate successfully.
Troubleshooting
- Failed to login with saved session: Indicates the stored session cookie is invalid or expired. Solution: regenerate the QR code or update the session credentials.
- Invalid credentials error: Happens if the authentication method or cookie is missing or incorrect. Ensure the credential includes valid session data.
- Connection errors: Network issues or API changes may cause failures. Check logs for detailed error messages.
- No events triggered: Verify that the selected event types match the incoming events and that user filtering (if enabled) includes the correct user IDs.
Links and References
- Zalo Official Developer Documentation
- Zalo Messaging API Guides
- n8n documentation on Creating Custom Triggers