Mtai Zalo Group icon

Mtai Zalo Group

Quản lý nhóm Zalo

Overview

This node manages Zalo groups by interacting with the Zalo API. It allows users to perform various group-related operations such as creating groups, retrieving group information, managing group members and deputies, changing group details (name or avatar), and listing all groups.

The "Lấy Tất Cả Nhóm" (Get All Groups) operation specifically retrieves a list of all Zalo groups accessible with the provided credentials. This is useful for scenarios where you want to synchronize or display all your Zalo groups in an external system, automate group management workflows, or analyze group data.

Practical example:

  • Automatically fetch all your Zalo groups to display them in a dashboard.
  • Use the list of groups to trigger further automation, like sending messages or updating group settings.

Properties

Name Meaning
Giới Hạn The maximum number of groups to retrieve (limit). Default is 50.

Note: Although the property "Giới Hạn" (limit) is defined, the bundled code's "getAllGroups" operation does not explicitly use this limit parameter when calling the API. It simply calls getAllGroups() without arguments. This might mean the limit is either handled internally by the API or the property is reserved for future use.

Output

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

{
  "response": [ /* array of group objects */ ]
}
  • response: An array containing all the groups retrieved from the Zalo API. Each group object includes details about the group as returned by the API.

No binary data output is produced by this operation.

Dependencies

  • Requires valid Zalo API credentials including cookie, IMEI, and user agent information.
  • The node uses an external library (zca-js) to interact with the Zalo API.
  • Credentials must be configured in n8n with appropriate authentication tokens/cookies to allow API access.

Troubleshooting

  • No API instance found error: This occurs if the node cannot create a valid API client instance due to missing or invalid credentials. Ensure that the Zalo API credentials are correctly set up and contain valid cookie, IMEI, and user agent values.
  • API call failures: If the API returns errors (e.g., unauthorized, rate limits), verify that the credentials have sufficient permissions and are not expired.
  • Limit property ignored: The "Giới Hạn" property may not affect the number of groups returned if the underlying API method does not support limiting results. Check the API documentation or update the node if needed.

If the node is set to continue on fail, errors for individual items will be returned in the output JSON under an error field.

Links and References

Discussion