Zalo User icon

Zalo User

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

Overview

This node interacts with Zalo's user-related functionalities, allowing you to manage and retrieve information about Zalo users. It is useful for automating tasks such as fetching user details, managing friend requests, blocking/unblocking users, and updating user profile settings on the Zalo platform.

Practical examples include:

  • Automatically retrieving detailed information about a specific Zalo user by their User ID.
  • Accepting or sending friend requests programmatically.
  • Blocking or unblocking users based on certain criteria.
  • Changing a friend's alias name in your contact list.
  • Undoing sent messages within conversations.

This node is beneficial for businesses or developers who want to integrate Zalo user management into their workflows without manual intervention.

Properties

Name Meaning
User ID The unique identifier of the Zalo user to perform operations on (e.g., get info, block).

Note: For the "Lấy thông tin người dùng" (Get user information) operation, only the User ID property is required.

Output

The output JSON structure varies depending on the operation:

  • For getUserInfo operation (Lấy thông tin người dùng), the output JSON contains detailed user information retrieved from Zalo. The exact fields depend on the API response but typically include user profile data.

  • For other user-related operations like accepting friend requests, sending friend requests, blocking/unblocking users, changing alias names, or undoing messages, the output JSON includes:

    • A status field indicating success (e.g., "Thành công" meaning "Success").
    • A response field containing the raw response from the Zalo API call.
  • When fetching all friends, the output JSON contains a friends array listing friend objects up to the specified limit.

  • In case of errors (if "Continue On Fail" is enabled), the output JSON will contain an error field with the error message.

The node does not output binary data.

Dependencies

  • Requires valid Zalo API credentials including authentication cookies, device IMEI, and user agent strings.
  • Uses an external Zalo API client library (zca-js) to interact with Zalo services.
  • The node expects these credentials to be configured properly in n8n before execution.

Troubleshooting

  • No API instance found error: This occurs if the node cannot establish a connection to Zalo using the provided credentials. Ensure that the API key credential is valid and contains correct cookie, IMEI, and user agent values.

  • Operation-specific errors: If an operation fails (e.g., invalid User ID, insufficient permissions), the node throws an error unless "Continue On Fail" is enabled, in which case the error message is returned in the output JSON.

  • Missing required parameters: Make sure to provide all required input properties such as User ID for user-related operations.

  • Rate limiting or API restrictions: Since this node relies on Zalo's API, hitting rate limits or violating API policies may cause failures.

Links and References

Discussion