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 incoming friend requests).

Output

The node outputs JSON data representing the friend event received from Zalo. The output JSON contains a friendEvent field with detailed information about the friend event, such as the type of event and associated data (e.g., details about the friend request).

No binary data output is produced by this node.

Example output structure:

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

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 valid Zalo credentials including cookie, device IMEI, and user agent string.
  • The node sets up a webhook URL in n8n to receive event callbacks from Zalo.

Troubleshooting

  • No credentials found: Ensure you have configured the required Zalo API credentials correctly in n8n before activating the node.
  • Zalo connection failed: This error indicates failure to authenticate or establish a connection with Zalo. Verify that the cookie, IMEI, and user agent values are valid and not expired.
  • Webhook not receiving events: Confirm that the webhook URL is accessible from Zalo and that the workflow is active.
  • Event types not triggering: Make sure the selected event types match the actual events sent by Zalo.

Links and References

Discussion