Zalo User icon

Zalo User

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

Overview

This node integrates with the Zalo platform to manage and interact with Zalo users. It supports various user-related operations such as searching for users by phone number, managing friend requests, blocking/unblocking users, updating profile settings, retrieving user information, and handling friends lists.

A common use case is automating user management tasks on Zalo, for example:

  • Searching for a user by their phone number to verify or retrieve their details.
  • Automatically accepting or sending friend requests.
  • Fetching a list of all friends up to a specified limit.
  • Changing alias names for friends to organize contacts better.

These capabilities are useful for businesses or developers who want to integrate Zalo user management into their workflows or CRM systems.

Properties

Name Meaning
Limit The maximum number of results to return when fetching multiple items (e.g., friends list).
Phone Number The phone number used to search for a specific Zalo user.

Output

The output JSON structure varies depending on the operation:

  • For findUser operation: Outputs the user data found by phone number in JSON format.
  • For getAllFriends operation: Outputs an object with a friends array containing friend details, limited by the Limit property.
  • For other user operations like acceptFriendRequest, sendFriendRequest, blockUser, etc., outputs a JSON object with a status field indicating success and a response field containing the API response.
  • For getUserInfo: Outputs detailed user information as returned by the API.

No binary data output is produced by this node.

Dependencies

  • Requires valid Zalo API credentials including authentication tokens such as cookies, IMEI, and user agent strings.
  • The node uses an external Zalo API client library (zca-js) to perform API calls.
  • Credentials must be configured properly in n8n to allow successful login and API interaction.

Troubleshooting

  • Invalid or missing credentials: If the node cannot establish an API instance, it throws an error indicating no API instance was found. Ensure that the Zalo API credentials (cookie, IMEI, user agent) are correctly set and valid.
  • API call failures: Errors from the Zalo API (e.g., invalid user ID, blocked actions) will be thrown as node errors unless "Continue On Fail" is enabled, in which case the error message is returned in the output JSON.
  • Incorrect input parameters: Make sure required properties like phoneNumber for the findUser operation or limit for getAllFriends are provided and valid.
  • Rate limits or API restrictions: The Zalo API may impose limits; handle these gracefully by catching errors or implementing retries outside the node.

Links and References

Discussion