Zalo User icon

Zalo User

Quản lý người dùng Zalo

Overview

This node manages interactions with Zalo users, specifically allowing actions such as sending friend requests, accepting friend requests, blocking/unblocking users, updating profile settings, retrieving user info, and more. It is useful for automating social interactions on the Zalo platform, such as managing contacts or integrating Zalo user management into workflows.

The "Gửi lời mời kết bạn" (Send Friend Request) operation sends a friend request to a specified Zalo user ID with an optional accompanying message. This can be used in scenarios like automating outreach campaigns, onboarding new contacts, or integrating Zalo friend requests into customer engagement processes.

Properties

Name Meaning
User ID The ID of the Zalo user to whom the friend request will be sent.
Message The message that accompanies the friend request.

Output

The output JSON contains:

  • status: A string indicating the result status, typically "Thành công" meaning "Success".
  • response: The raw response object returned from the Zalo API after sending the friend request.

Example output structure:

{
  "status": "Thành công",
  "response": {
    // API response details here
  }
}

No binary data output is produced by this operation.

Dependencies

  • Requires valid Zalo API credentials including cookie, device IMEI, and user agent information.
  • Uses the external zca-js library to interact with the Zalo API.
  • The node expects these credentials to be configured in n8n under a generic API key credential for Zalo.

Troubleshooting

  • Invalid Credentials: If the node throws "No API instance found. Please make sure to provide valid credentials.", verify that the Zalo API credentials are correctly set up and include valid cookie, IMEI, and user agent values.
  • API Errors: Errors from the Zalo API (e.g., invalid user ID, rate limits) will be thrown as node errors unless "Continue On Fail" is enabled, in which case error messages will appear in the output JSON.
  • Missing Required Parameters: Ensure both "User ID" and "Message" fields are provided; otherwise, the node may fail or produce unexpected results.

Links and References

Discussion