Zalo User Interact icon

Zalo User Interact

Gửi tin nhắn và tương tác với Zalo User

Overview

This n8n custom node provides integration with Zalo, specifically for managing group-related operations. The "Remove User From Group" operation under the Group resource allows you to programmatically remove a user from a specified Zalo group by their user ID and group ID.

Common scenarios:

  • Automating moderation tasks in Zalo groups (e.g., removing users who violate rules).
  • Integrating with other systems to synchronize group membership.
  • Building workflows that manage group access based on external triggers or business logic.

Practical example:
You can use this node in an n8n workflow to automatically remove a user from a Zalo group when they are flagged in your CRM or after a certain event occurs.


Properties

For the Group resource and Remove User From Group operation, the following input properties are relevant:

Display Name Type Description
User Id String ID của Zalo User để lấy thông tin.
Group Id String ID của nhóm Zalo.

Both fields are required:

  • User Id: The unique identifier of the Zalo user to be removed from the group.
  • Group Id: The unique identifier of the Zalo group from which the user will be removed.

Output

The output is a JSON object indicating the result of the removal operation. The structure typically includes:

{
  "success": true,
  "data": { ... } // Details about the operation, if available
}
  • If the operation is successful, "success" will be true and "data" may contain additional information about the action taken.
  • If there is an error, the output will include an error message and stack trace, e.g.:
{
  "success": false,
  "error": "Error message",
  "stack": "Stack trace"
}

No binary data is produced by this operation.


Dependencies

  • Zalo API Access: You must have valid credentials and permissions to manage Zalo groups via the API.
  • n8n Configuration: Any necessary authentication (API keys, tokens) should be configured in n8n credentials for Zalo.
  • External Libraries: This node uses standard Node.js modules and possibly some helper libraries bundled within the node package.

Troubleshooting

Common issues:

  • Invalid User Id or Group Id: If either ID is incorrect or does not exist, the operation will fail.
  • Insufficient Permissions: The authenticated account must have admin rights in the group to remove members.
  • API Rate Limits: Excessive requests may trigger rate limiting by Zalo.
  • Network/Connectivity Issues: Temporary network problems can cause failures.

Error messages you might see:

  • "User not found": The provided User Id does not correspond to any member in the group.
  • "Group not found": The Group Id is invalid or inaccessible.
  • "Permission denied": The API credentials do not have sufficient rights.
  • "Unknown error": For unexpected issues, check the stack trace for more details.

How to resolve:

  • Double-check the User Id and Group Id values.
  • Ensure your Zalo API credentials are correct and have the necessary permissions.
  • Retry after some time if you suspect rate limiting or temporary issues.

Links and References


Discussion