Zalo Group icon

Zalo Group

Quản lý nhóm Zalo

Overview

This node manages Zalo groups by interacting with the Zalo API. Specifically, the "Thêm Phó Nhóm" (Add Group Deputy) operation allows you to assign a user as a deputy (co-admin) of a specified Zalo group. This is useful for delegating group management responsibilities without transferring full ownership.

Common scenarios include:

  • Adding trusted members as deputies to help moderate and manage group activities.
  • Automating group role assignments in workflows that handle group membership changes.
  • Integrating group management into broader automation pipelines involving Zalo.

Example: Automatically add a user as a deputy when they join a group or meet certain criteria.

Properties

Name Meaning
ID Nhóm The unique identifier of the Zalo group where the deputy will be added.
ID Người Dùng The unique identifier of the user to be added as a deputy in the group.

Output

The output JSON contains:

  • status: A string indicating the success of the operation, e.g., "Thành công" ("Success").
  • response: The raw response from the Zalo API after attempting to add the deputy user.

Example output structure:

{
  "status": "Thành công",
  "response": { /* API response object */ }
}

No binary data is produced by this operation.

Dependencies

  • Requires valid Zalo API credentials including an API key credential with cookie, IMEI, and user agent information.
  • The node uses the zca-js library to interact with the Zalo API.
  • Proper configuration of the Zalo API credential in n8n is necessary to authenticate requests.

Troubleshooting

  • Invalid Credentials: If the node throws an error about missing or invalid API instance, verify that the Zalo API credentials are correctly set up and contain valid cookie, IMEI, and user agent values.
  • User or Group Not Found: Errors may occur if the provided group ID or user ID does not exist or the authenticated account lacks permission. Double-check these IDs.
  • API Rate Limits or Restrictions: The Zalo API might limit how often you can add deputies or modify groups. Handle errors gracefully and consider retry logic.
  • Continue on Fail: The node supports continuing execution on failure for individual items; enable this option to prevent workflow interruption.

Links and References

Discussion