Zalo CN User  icon

Zalo CN User

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

Overview

This node manages Zalo user interactions through the Zalo API, specifically for the "Zalo User" resource. The "Chặn Người Dùng" (Block User) operation allows you to block a specified Zalo user by their user ID. This is useful in scenarios where you want to prevent certain users from contacting or interacting with your Zalo account, such as blocking spam accounts or unwanted contacts.

Practical example:

  • Automatically block users who send unsolicited messages by passing their user IDs to this node.
  • Integrate with other workflows to manage user access dynamically based on behavior or external triggers.

Properties

Name Meaning
User ID The ID of the Zalo user to block

Output

The node outputs a JSON object containing:

  • status: A string indicating the result status, typically "Thành công" meaning "Success".
  • response: The raw response from the Zalo API confirming the block action.

Example output JSON structure:

{
  "status": "Thành công",
  "response": {
    // API response details about the block action
  }
}

No binary data is produced by this node.

Dependencies

  • Requires an active connection to the Zalo API via credentials that include authentication cookies, device IMEI, and user agent strings.
  • The node depends on the external zalo-api-final library to interact with the Zalo platform.
  • Properly configured Zalo API credentials must be provided in n8n to authenticate requests.

Troubleshooting

  • Common issues:

    • Invalid or expired credentials may cause login failures.
    • Missing or incorrect user IDs will result in errors when attempting to block.
    • Network or API downtime can lead to request failures.
  • Error messages:

    • "No API instance found. Please make sure to provide valid credentials."
      Means the node could not authenticate with Zalo API. Check your credentials and ensure they are valid and up to date.
    • Errors related to invalid user IDs usually indicate the user does not exist or cannot be blocked. Verify the user ID input.
    • If the node throws errors but "Continue On Fail" is enabled, it will return error details per item instead of stopping execution.

Links and References

Discussion