Zalo User Trigger icon

Zalo User Trigger

Receive events from Zalo User and trigger workflows

Overview

This node listens to various real-time events from a messaging platform (likely Zalo, based on context). It enables workflows to react automatically when specific types of events occur, such as receiving messages, group-related events, reactions to messages, or message undo actions. This is useful for automating responses, logging activities, or triggering other processes based on user interactions in chats or groups.

Practical examples include:

  • Automatically responding to incoming user messages.
  • Monitoring group events like new members joining or leaving.
  • Tracking reactions added to messages for sentiment analysis.
  • Detecting when messages are retracted to update logs or notify users.

Properties

Name Meaning
Events Select which event types to listen for:
- Message: Listen to messages from users or groups.
- Group: Listen to group-related events.
- Reaction: Listen to message reaction events.
- Undo: Listen to message undo (retraction) events.
Include Self Events Whether to listen to events sent by yourself (the bot/user running the workflow).
Allowed Thread IDs Comma-separated list of thread IDs (groups or users) to listen to. If empty, all threads are listened to. Example: 123456789,987654321
Blocked Thread IDs Comma-separated list of thread IDs to ignore. If empty, no threads are blocked. Example: 123456789,987654321
Get Metadata Whether to fetch additional user metadata from the platform (e.g., user profile info).

Output

The node outputs JSON data representing the event details whenever an event matching the configured criteria occurs. The output includes:

  • json: An object containing the event data, including event type, content, sender information, and timestamp.
  • event: A string indicating the event type (e.g., "message", "group_event", "reaction", "undo").
  • timestamp: The time when the event was received.
  • workflow_id: The ID of the workflow instance processing the event.

If "Get Metadata" is enabled, the output JSON also contains enriched user information such as name, avatar, phone number, gender, status, and other profile details fetched from the platform.

The node does not output binary data.

Dependencies

  • Requires connection to the messaging platform's real-time event API.
  • Needs an API key or authentication token credential configured in n8n to access the platform.
  • Optionally requires permission to fetch user metadata if "Get Metadata" is enabled.

Troubleshooting

  • No events received: Check that the API credentials are valid and have permissions to subscribe to events. Verify that the selected event types and thread ID filters match actual active threads.
  • Events missing or incomplete: Ensure "Include Self Events" is set correctly if you want to receive your own messages/events. Also, verify network connectivity and platform API status.
  • Metadata fetching errors: If "Get Metadata" is enabled but fails, confirm that the API key has rights to access user profile data and that rate limits are not exceeded.
  • Invalid thread IDs: Make sure thread IDs in allowed/blocked lists are correct and formatted as comma-separated strings without extra spaces.

Common error messages may relate to authentication failures, invalid parameters, or API rate limits. Resolving these typically involves checking credentials, input values, and platform status.

Links and References


Note: Internal variable names, credential types, or obfuscated code details have been omitted to comply with guidelines.

Discussion