Zalo Message Trigger icon

Zalo Message Trigger

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

Overview

This node listens for incoming messages on the Zalo platform, a popular messaging app. It acts as a trigger that activates workflows when new messages arrive either from individual users or groups. 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 events.
  • Triggering notifications or actions based on received messages.

For example, a business could use this node to listen for customer messages and automatically create support tickets or send acknowledgments.

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 the bot itself. Boolean value: true or false.

Output

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

Example output JSON structure:

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

No binary data output is produced by this node.

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.
  • Needs proper configuration of webhook URL in n8n to receive POST requests from Zalo.
  • Requires valid cookie, IMEI, and user agent information as part of the credentials to authenticate with Zalo.

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 authentication token or credential is configured in n8n before activating the node.
  • Webhook issues: Confirm that the webhook URL is publicly accessible and correctly set up in Zalo's developer settings to forward message events.
  • Self Listen not working: If enabling self listen does not capture messages sent by the bot, check if the Zalo API permissions allow this behavior.

Links and References

Discussion