Zalo User icon

Zalo User

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

Overview

The Zalo User node allows interaction with Zalo user accounts through various operations such as managing friend requests, blocking/unblocking users, updating profile settings, retrieving user information, and searching for users by phone number. Specifically, the "Tìm kiếm người dùng" (Find User) operation enables searching for a Zalo user by their phone number.

This node is beneficial in scenarios where you need to automate user management tasks on Zalo, such as integrating Zalo user data into CRM systems, automating friend request handling, or performing bulk user lookups based on phone numbers.

Practical example:
You have a list of phone numbers from your customer database and want to find corresponding Zalo users to send them promotional messages or friend requests automatically.


Properties

Name Meaning
Phone Number The phone number to search for the Zalo user.
Limit The maximum number of results to return from the search.

Output

The output JSON structure depends on the operation. For the "findUser" operation, the node outputs the user data returned by the Zalo API for the searched phone number. This typically includes user details such as user ID, name, avatar, and other profile information as provided by the API.

Example output snippet (conceptual):

{
  "userId": "123456789",
  "name": "Nguyen Van A",
  "avatar": "https://...",
  "phoneNumber": "0987654321",
  ...
}

If the operation fails or no user is found, the output may be empty or contain an error message depending on the API response.


Dependencies

  • Requires a valid Zalo API credential configured in n8n, including authentication cookies, device IMEI, and user agent strings.
  • Uses the external zca-js library to interact with the Zalo API.
  • The node expects these credentials to provide session cookies and device info necessary for API calls.

Troubleshooting

  • No API instance found error:
    This occurs if the node cannot establish a connection using the provided credentials. Ensure that the Zalo API credentials are correctly set up with valid cookies, IMEI, and user agent values.

  • Invalid or expired credentials:
    If the session cookie or authentication token expires, the node will fail to authenticate. Refresh or reauthenticate your Zalo API credentials.

  • Rate limiting or API errors:
    The Zalo API might limit requests or reject invalid queries. Check the API limits and ensure phone numbers are correctly formatted.

  • Empty results:
    If no user is found for a given phone number, verify the phone number is correct and registered on Zalo.


Links and References

(Note: Replace links with actual URLs if available.)

Discussion