Zalo Group icon

Zalo Group

Quản lý nhóm Zalo

Overview

This node manages Zalo groups by interacting with the Zalo API. It supports various group-related operations such as creating groups, retrieving group information, managing members and deputies, changing group details, and listing all groups.

A common use case is automating group management tasks in Zalo for businesses or communities that use Zalo as a communication platform. For example, you can automatically fetch all groups to monitor activity, add or remove users from groups based on external triggers, or update group names and avatars programmatically.

Specifically, the "Lấy Tất Cả Nhóm" (Get All Groups) operation retrieves a list of all Zalo groups accessible via the provided credentials, which is useful for syncing or auditing group data.

Properties

Name Meaning
Giới Hạn The maximum number of groups to retrieve. (Number input; default is 50)

Note: Although the "Giới Hạn" (limit) property is defined, the bundled code's "getAllGroups" operation does not explicitly use this limit parameter when fetching groups. It simply calls getAllGroups() without arguments.

Output

The output JSON structure for the "Lấy Tất Cả Nhóm" operation contains:

  • response: An array or object representing all groups retrieved from the Zalo API.

Example output JSON snippet:

{
  "response": [ /* list of group objects */ ]
}

Each item in the response typically includes group details as returned by the Zalo API. The exact structure depends on the API but generally includes group IDs, names, member counts, and other metadata.

The node does not output binary data.

Dependencies

  • Requires valid Zalo API credentials including an API key credential with cookie, IMEI, and user agent information.
  • Uses the external zca-js library to interact with the Zalo API.
  • Requires proper configuration of the Zalo API credential in n8n with necessary authentication tokens.

Troubleshooting

  • No API instance found error: This occurs if the node cannot create a valid API client instance, likely due to missing or invalid credentials. Ensure the Zalo API credential is correctly configured with valid cookie, IMEI, and user agent values.
  • API call failures: If the Zalo API returns errors (e.g., permission denied, rate limits), these will be thrown as node errors. Check your API quota and permissions.
  • Limit property ignored: The "Giới Hạn" property may not affect the number of groups returned by the "getAllGroups" operation because the underlying API call does not accept a limit parameter. You might need to handle limiting results downstream.

Links and References

Discussion