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 retrieve their profile.
  • Fetching a list of friends up to a specified limit.
  • Sending or accepting friend requests programmatically.
  • Changing alias names for friends or undoing sent messages.

This node is beneficial for businesses or developers who want to automate interactions with Zalo users without manual intervention.

Properties

Name Meaning
Limit The maximum number of results to return when fetching multiple items (e.g., friends).
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: Outputs the found user's details in JSON format.
  • For getAllFriends: Outputs an object with a friends array containing friend profiles, limited by the Limit property.
  • For operations like acceptFriendRequest, sendFriendRequest, blockUser, unblockUser, changeAliasName, undoMessage, and changeAccountSetting: Outputs a JSON object with a status field indicating success and a response field containing the API response.
  • For getUserInfo: Outputs the detailed user information directly.
  • For error cases (if "Continue On Fail" is enabled), outputs an error message in the error field.

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 authenticated access to Zalo services.

Troubleshooting

  • Invalid Credentials: If the node throws "No API instance found," it indicates invalid or missing credentials. Ensure that the API key, cookie, IMEI, and user agent are correctly set.
  • API Rate Limits or Restrictions: Frequent requests might be throttled by Zalo. Implement delays or reduce request frequency if errors occur.
  • Operation-Specific Errors: Errors during operations like sending friend requests or blocking users will be reported with the error message. Enable "Continue On Fail" to handle these gracefully.
  • Missing Required Parameters: Each operation requires certain parameters (e.g., phone number for findUser). Make sure all required inputs are provided.

Links and References

Discussion