Zalo Group icon

Zalo Group

Quản lý nhóm Zalo

Overview

This node manages Zalo groups, specifically focusing on group-related operations such as creating groups, retrieving group information, managing members, and updating group details. The "Lấy Danh Sách Thành Viên" (Get Group Members) operation fetches a list of members from a specified Zalo group, including detailed profile information for each member.

Common scenarios where this node is useful include:

  • Retrieving current members of a Zalo group for monitoring or reporting.
  • Managing group membership by adding or removing users.
  • Updating group metadata like name or avatar.
  • Creating notes pinned to the group.

Practical example:
You want to get up to 50 members of a specific Zalo group to analyze participation or send targeted messages. Using this node with the "Lấy Danh Sách Thành Viên" operation, you provide the group ID and limit, then receive member IDs and their profiles in the output.

Properties

Name Meaning
ID Nhóm The unique identifier of the Zalo group from which to retrieve members.
Giới Hạn The maximum number of group members to retrieve (limit).

Output

The output JSON contains the following fields:

  • memberIds: An array of member IDs retrieved from the group, limited by the specified number.
  • profiles: An object containing detailed profile information for each member ID.
  • totalMembers: The total number of members returned (up to the limit).
  • limit: The requested maximum number of members to retrieve.
  • groupInfo: Metadata about the group itself, including general group information.

No binary data is output by this operation.

Example output structure:

{
  "memberIds": ["12345", "67890", "..."],
  "profiles": {
    "12345": { /* profile details */ },
    "67890": { /* profile details */ }
  },
  "totalMembers": 50,
  "limit": 50,
  "groupInfo": { /* group metadata */ }
}

Dependencies

  • Requires an API key credential to authenticate with the Zalo platform.
  • Uses a third-party library (zca-js) to interact with the Zalo API.
  • Requires valid cookie, IMEI, and user agent values either from credentials or input data for authentication.
  • Must be configured with proper Zalo API credentials in n8n.

Troubleshooting

  • Invalid Credentials: If the node cannot authenticate, it will throw an error indicating no API instance was found. Ensure that the provided API key credential includes valid cookie, IMEI, and user agent information.
  • Empty Member List: If the group has no members or the group ID is invalid, the output will contain empty arrays/objects. Verify the group ID correctness.
  • Limit Exceeded: Setting a very high limit might cause performance issues or API errors. Use reasonable limits according to your needs.
  • API Rate Limits: Frequent calls may hit Zalo API rate limits; handle errors gracefully and consider retry strategies.
  • Continue On Fail: If enabled, the node will continue processing other items even if one fails, returning error messages per item.

Links and References

Discussion