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 webhook trigger that activates when such events occur, allowing workflows to respond automatically to new friend requests on Zalo.

Common scenarios where this node is useful include:

  • Automatically processing or logging incoming friend requests.
  • Sending notifications or alerts when a new friend request arrives.
  • Integrating Zalo friend events with other systems or CRMs.

For example, a workflow could use this node to listen for friend requests and then add requester details to a contact management system or send an internal message to a team member.

Properties

Name Meaning
Event Types Friend events to listen for. Options: "Friend Requests" (listens for incoming friend requests on Zalo)

Output

The node outputs JSON data representing the friend event received from Zalo. The output structure includes a friendEvent object containing details about the specific friend event triggered (e.g., information about the friend request).

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 valid Zalo API credentials including authentication cookies, device IMEI, and user agent string.
  • Uses the Zalo SDK (zca-js) to connect and listen for friend events.
  • Needs a webhook URL configured in n8n to receive POST requests when events occur.
  • The node depends on proper credential setup within n8n to authenticate with Zalo's API.

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 events received: Confirm that the webhook URL is accessible publicly and correctly set in the node configuration. Also, check that the selected event types match the actual events being sent by Zalo.
  • Missing credentials error: The node requires credentials to connect; ensure these are configured before activating the workflow.
  • Webhook not triggering: Make sure the external service (Zalo) can reach the webhook URL and that no firewall or network restrictions block incoming requests.

Links and References

Discussion