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 groups. The "Add User To Group" operation allows you to add a user to a specified Zalo group by providing the required identifiers. This is useful in automation scenarios where you need to programmatically manage group memberships, such as onboarding new users into team or project chat groups, automating access control, or synchronizing group membership with other systems.

Example use cases:

  • Automatically adding new employees to company chat groups.
  • Enrolling customers into support or announcement groups after registration.
  • Integrating with CRM or HR systems to keep group memberships up-to-date.

Properties

Below are the input properties relevant to the "Group" resource and "Add User To Group" operation:

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 for this operation.


Output

The output of this node for the "Add User To Group" operation is an array of objects, each containing a json field. The structure is as follows:

[
  {
    "json": {
      "success": true,
      "data": { /* API response data from Zalo */ }
    }
  }
]
  • If the operation succeeds, success will be true, and data will contain the response from the Zalo API (such as confirmation details).
  • If there is an error, the object may look like:
[
  {
    "json": {
      "success": false,
      "error": "Error message",
      "stack": "Stack trace if available"
    }
  }
]

Dependencies

  • Zalo API Access: You must have valid credentials and permissions to interact with the Zalo API for group management.
  • n8n Configuration: Ensure that any necessary authentication (API keys, tokens) is set up in your n8n instance or environment variables as required by the Zalo integration.

Troubleshooting

Common Issues

  • Invalid User Id or Group Id: If either identifier is incorrect or does not exist, the operation will fail.
  • Insufficient Permissions: The authenticated account must have permission to add users to the specified group.
  • User Already in Group: Attempting to add a user who is already a member may result in an error or a no-op response.
  • API Rate Limits: Excessive requests may trigger rate limiting by Zalo.

Error Messages

  • "success": false, "error": "...": Indicates a failure; check the error message for details (e.g., invalid IDs, permission denied).
  • Stack traces may be included for debugging but should not be exposed to end-users in production.

How to resolve:

  • Double-check the User Id and Group Id values.
  • Ensure your Zalo account has the correct permissions.
  • Review Zalo API documentation for specific error codes and meanings.

Links and References


Discussion