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 for incoming messages on the Zalo platform, a popular messaging app. It listens for new messages either from individual users or groups and triggers workflows when such messages are received. This is useful for automating responses, logging conversations, or integrating Zalo messages with other systems.

Common scenarios include:

  • Automatically processing user inquiries sent via Zalo.
  • Monitoring group chats for specific keywords or commands.
  • Logging all incoming messages for analytics or compliance.

For example, a business could use this node to listen for customer messages on Zalo and automatically create support tickets in their CRM system.

Properties

Name Meaning
Event Types Types of messages to listen for. Options: User Messages (messages from individual users), Group Messages (messages from groups). Default listens to both.
Self Listen Whether to allow listening to messages sent by the bot itself. Boolean value (true/false).

Output

The node outputs JSON data representing the incoming message event received from Zalo. The output contains a message object with details about the message that triggered the webhook.

The structure of the output JSON corresponds directly to the payload sent by Zalo's message listener, which includes information such as sender, content, timestamp, and message type.

No binary data output is produced by this node.

Dependencies

  • Requires an API key credential to connect to the Zalo platform.
  • Uses the zca-js library internally to handle Zalo API interactions and message listening.
  • Needs proper configuration of the webhook URL in n8n to receive POST requests from Zalo.
  • Requires valid authentication cookies, device IMEI, and user agent strings as part of the credentials to establish connection.

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 configured in n8n before activating the node.
  • Webhook not triggered: Confirm that the webhook URL is correctly set up in Zalo's developer console and accessible from the internet.
  • Listening to self messages: If you want the node to react to messages sent by itself, enable the "Self Listen" property; otherwise, those messages will be ignored.

Links and References

Discussion