Zalo Message Trigger icon

Zalo Message Trigger

Sự kiện lắng nghe tin nhắn trên Zalo

Overview

The "Zalo Message Trigger" node listens for incoming messages on the Zalo platform, a popular messaging app. It acts as a webhook-based trigger that activates workflows when new messages arrive either from individual users or groups, depending on configuration. This node is useful for automating responses, logging conversations, or integrating Zalo messages with other systems.

Practical examples include:

  • Automatically responding to user inquiries sent via Zalo.
  • Logging group chat messages into a CRM or database.
  • Triggering notifications or alerts based on specific message content received in Zalo chats.

Properties

Name Meaning
Event Types Types of messages to listen for. Options: User Messages (messages from individual users), Group Messages (messages from groups). Multiple selections allowed.
Self Listen Whether to enable message notifications for messages sent by the authenticated user itself. Boolean value (true/false).

Output

The node outputs JSON data representing the incoming Zalo message event. The output structure contains a message object with details about the received message. This JSON can be used downstream in the workflow for further processing.

No binary data output is produced by this node.

Example output JSON structure:

{
  "message": {
    // message details as received from Zalo
  }
}

Dependencies

  • Requires an API key credential to connect to the Zalo platform.
  • Uses the external zca-js library to handle Zalo API interactions and message listening.
  • The node sets up a webhook URL within n8n to receive POST requests triggered by incoming messages.
  • Requires valid Zalo authentication cookies, device IMEI, and user agent strings configured in credentials.

Troubleshooting

  • Connection failures: If the node throws "Zalo connection failed," verify that the provided credentials (cookie, IMEI, user agent) are correct and have not expired.
  • No credentials found: Ensure that the required API key credential is properly set up and linked to the node.
  • Webhook issues: Confirm that the webhook URL is accessible from the internet and correctly configured in Zalo's developer settings if applicable.
  • Message filtering: If no messages trigger the workflow, check that the selected event types match the incoming message types and that "Self Listen" is enabled if you want to receive notifications for your own messages.

Links and References

Discussion