Zalo User icon

Zalo User

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

Overview

This node manages Zalo users by interacting with the Zalo platform through its API. It supports operations such as blocking a user, accepting friend requests, sending friend requests, changing alias names, and retrieving user information. This node is useful for automating user management tasks on Zalo, such as moderating contacts, managing friend lists, or updating user settings programmatically.

Practical examples include:

  • Automatically blocking users based on certain criteria.
  • Accepting incoming friend requests without manual intervention.
  • Sending friend requests with custom messages.
  • Retrieving detailed information about specific users for CRM or analytics purposes.

Properties

Name Meaning
User ID The unique identifier of the user to perform the operation on.

For the "blockUser" operation specifically, only the User ID property is required.

Output

The output JSON structure typically contains:

  • status: A string indicating the success status, usually "Thành công" (meaning "Success").
  • response: The raw response from the Zalo API for the performed operation, which may include details about the action taken or the updated user state.

Example output for blocking a user:

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

No binary data output is produced by this node.

Dependencies

  • Requires an API key credential to authenticate with the Zalo platform.
  • Needs valid Zalo API credentials including cookie, device IMEI, and user agent strings.
  • Uses the external zca-js library to interact with the Zalo API.
  • Must be configured with proper Zalo API credentials in n8n before use.

Troubleshooting

  • Common issues:

    • Invalid or expired credentials can cause authentication failures.
    • Missing or incorrect User ID input will result in errors.
    • Network connectivity problems may prevent API calls from succeeding.
  • Error messages:

    • "No API instance found. Please make sure to provide valid credentials."
      Means the node could not authenticate with Zalo API. Check that the API credentials are correctly set and valid.
    • Errors thrown during API calls will be reported with their message. If "Continue On Fail" is enabled, the node will return error details per item instead of stopping execution.
  • Resolution tips:

    • Verify and refresh your Zalo API credentials.
    • Ensure all required input properties are provided and correctly formatted.
    • Enable "Continue On Fail" to handle partial failures gracefully during batch processing.

Links and References

Discussion