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 avatars or names, 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 via the provided credentials. This is useful for scenarios where you want to synchronize group data, audit group memberships, or display available groups in an application.

Practical example:

  • Automatically fetch all your Zalo groups to display them in a dashboard.
  • Use the list of groups to trigger further automation workflows based on group membership or activity.

Properties

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

Note: Although the bundled code does not explicitly use the limit parameter in the "getAllGroups" operation, it is defined as a required input property and likely intended to limit the number of groups fetched.

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 the details of all retrieved Zalo groups. Each element represents a group with its associated metadata as returned by the Zalo API.

No binary data output is produced by this operation.

Dependencies

  • Requires valid Zalo API credentials including cookie, IMEI, and user agent information.
  • Uses the external zca-js library to interact with the Zalo API.
  • The node expects these credentials to be configured in n8n under a generic API key credential type (referred to here as "Zalo Credential").

Troubleshooting

  • Common issues:

    • Invalid or expired credentials may cause login failure, resulting in no API instance found error.
    • Missing or malformed cookie, IMEI, or user agent values can prevent successful authentication.
    • Network connectivity issues with the Zalo API endpoint.
  • Error messages:

    • "No API instance found. Please make sure to provide valid credentials."
      Means the node failed to authenticate with the Zalo API. Verify that the credentials are correct and up to date.
    • Errors during API calls will be reported per item if "Continue On Fail" is enabled; otherwise, execution stops at the first error.

Links and References

Discussion