Zalo Friend Trigger icon

Zalo Friend Trigger

Lắng nghe sự kiện kết bạn trên Zalo

Overview

This node listens for friend-related events on the Zalo platform, specifically friend requests. It acts as a trigger that activates workflows when such events occur. This is useful for automating responses or actions based on incoming friend requests on Zalo, such as sending welcome messages, logging new connections, or integrating with CRM systems.

Practical examples:

  • Automatically send a greeting message when someone sends a friend request.
  • Log friend requests into a database or spreadsheet for tracking.
  • Trigger notifications to team members about new friend requests.

Properties

Name Meaning
Event Types Friend events to listen for. Options: "Friend Requests" (listens for friend request events)

Output

The node outputs JSON data representing the friend event received from Zalo. The output structure includes a friendEvent object containing details of the event, such as the type and associated data.

Example output JSON structure:

{
  "friendEvent": {
    "type": 2,
    "data": {
      // Details about the friend request event
    }
  }
}

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 to handle Zalo API interactions and event listening.
  • Needs proper configuration of webhook URL in n8n to receive events.
  • Requires valid Zalo credentials including cookie, IMEI, and user agent information.

Troubleshooting

  • Connection failures: If the node throws "Zalo connection failed," verify that the provided credentials 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 accessible from Zalo and that the workflow is active to receive events.
  • Event filtering: If no events trigger the workflow, check that the selected event types match the incoming events.

Links and References

Discussion