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 associated with the authenticated user. This is useful for scenarios where you want to display or process all groups without specifying each group individually.

Practical examples:

  • Fetching all groups to display in a dashboard.
  • Synchronizing group data with an external system.
  • Automating reports or notifications based on group membership.

Properties

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

Note: The provided property "Giới Hạn" (limit) is defined but not explicitly used in the "getAllGroups" operation in the source code. It might be intended for future use or filtering after retrieval.

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 snippet:

{
  "response": [
    {
      "groupId": "12345",
      "name": "Group Name",
      "membersCount": 10,
      ...
    },
    ...
  ]
}

No binary data output is produced by this operation.

Dependencies

  • Requires valid Zalo API credentials including cookie, IMEI, and user agent details.
  • Uses the external zca-js library to interact with the Zalo API.
  • Requires the user to configure an API key credential with necessary authentication tokens.
  • The node depends on n8n's credential management to securely store and access these credentials.

Troubleshooting

  • No API instance found: This error occurs if the node cannot create a valid API client instance due to missing or invalid credentials. Ensure that the API key credential is correctly configured with valid cookie, IMEI, and user agent values.
  • API call failures: Network issues or invalid parameters may cause errors when calling Zalo API methods. Verify network connectivity and parameter correctness.
  • Empty response: If no groups are returned, confirm that the authenticated user actually belongs to any groups.
  • Limit property unused: Although the "Giới Hạn" property exists, it is not applied in the current implementation of "getAllGroups". Users expecting limited results should handle filtering downstream or check for updates in the node.

Links and References

Discussion