Zalo Message Trigger icon

Zalo Message Trigger

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

Overview

This node acts as a trigger to listen for incoming messages on the Zalo platform, a popular messaging app. It is designed to capture real-time message events either from individual users or group chats. This functionality is useful in scenarios such as automating responses, logging conversations, or integrating Zalo messages into broader workflows.

For example, you could use this node to:

  • Automatically respond to user inquiries sent via Zalo.
  • Monitor group chat activity and trigger alerts based on specific keywords.
  • Collect and analyze message data for customer support purposes.

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 listen to messages sent by yourself (the authenticated account). Boolean value: true or false.

Output

The node outputs JSON data representing the received message event. The output structure contains a message object with details about the incoming message captured by the webhook. This includes all relevant message metadata as provided by the Zalo API.

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 authenticate with the Zalo platform.
  • Uses the zca-js library internally to handle Zalo API interactions.
  • The node sets up a webhook endpoint to receive message events from Zalo.
  • Requires proper configuration of the webhook URL in Zalo's developer settings to forward events to n8n.

Troubleshooting

  • Connection failures: If the node fails to connect, ensure that valid Zalo credentials are provided, including cookie, IMEI, and user agent information.
  • Webhook not triggering: Verify that the webhook URL is correctly registered in Zalo and publicly accessible.
  • No messages received: Check that the selected event types match the actual message sources and that "Self Listen" is enabled if you want to capture your own sent messages.
  • Error messages related to API instance: Usually indicates invalid or expired credentials; re-authenticate or update credentials accordingly.

Links and References

Discussion