Zalo Group icon

Zalo Group

Quản lý nhóm Zalo

Group → Thêm Thành Viên Vào Nhóm

AI-generated

Overview

This node manages Zalo groups by interacting with the Zalo API. Specifically, the "Thêm Thành Viên Vào Nhóm" (Add User to Group) operation allows users to add one or multiple members to an existing Zalo group by specifying the group ID and user IDs.

Common scenarios where this node is useful include:

  • Automating group membership management in Zalo for community or team chats.
  • Adding new participants to a project or event group without manual intervention.
  • Integrating Zalo group updates into broader workflows, such as CRM or notification systems.

Example: Automatically add newly registered users to a specific Zalo group by passing their user IDs and the target group ID.

Properties

Name Meaning
ID Nhóm (groupId) The unique identifier of the Zalo group where users will be added.
Danh Sách ID Thành Viên (userIds) A comma-separated list of user IDs to add to the group. Multiple users can be added at once.

Output

The output JSON contains the response from the Zalo API after attempting to add the specified users to the group. It typically includes details about the operation's success or failure and any relevant metadata returned by the API.

Example output structure (simplified):

{
  "json": {
    // API response data confirming users were added or error details
  },
  "pairedItem": {
    "item": 0
  }
}

No binary data output is produced by this operation.

Dependencies

  • Requires a valid Zalo API credential containing authentication information such as cookies, device IMEI, and user agent.
  • Uses the zca-js library to interact with the Zalo API.
  • The node expects these credentials to be configured properly in n8n before execution.

Troubleshooting

  • Invalid Credentials: If the node throws an error indicating no API instance found, verify that the Zalo API credentials are correctly set up and valid.
  • Incorrect Group ID or User IDs: Ensure the group ID exists and the user IDs are correct and active in Zalo; otherwise, the API may reject the request.
  • Malformed User ID List: The user IDs must be provided as a comma-separated string without extra spaces or invalid characters.
  • API Rate Limits or Permissions: The Zalo API might restrict adding users based on permissions or rate limits; check API documentation and credentials scope.
  • Error Handling: If the node is set to continue on fail, errors for individual items will be included in the output JSON under an error field.

Links and References

Discussion