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, depending on configuration. This node is useful in scenarios where you want to automate workflows based on new messages received on Zalo, such as customer support automation, chatbots, or notification systems.

For example, you could use this node to:

  • Trigger a workflow whenever a user sends a message to your Zalo account.
  • Listen to group chat messages to monitor discussions or extract data.
  • Filter out messages sent by yourself if desired, to avoid processing your own outgoing messages.

Properties

Name Meaning
Event Types Types of messages to listen for. Options: "User Messages" (messages from individual users), "Group Messages" (messages from groups). You can select one or both.
Self Listen Whether to allow listening to messages sent by yourself. 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 field with detailed information about the message event captured by the webhook.

Example output JSON structure:

{
  "message": {
    // Detailed message event data from Zalo API
  }
}

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.
  • Requires proper configuration of the webhook URL in n8n to receive incoming message events.
  • The node depends on valid Zalo credentials including cookie, IMEI, and user agent details for authentication.

Troubleshooting

  • Connection failures: If the node throws "Zalo connection failed," verify that the provided credentials are correct and have not expired. Ensure the cookie, IMEI, and user agent values are valid.
  • No messages received: Confirm that the webhook URL is correctly set up and publicly accessible so Zalo can send events to it.
  • Listening to self messages: If you do not want to process messages sent by yourself, ensure the "Self Listen" property is set to false.
  • Credential errors: Make sure the API key credential is properly configured in n8n and linked to this node.

Links and References

Discussion