Zalo Group icon

Zalo Group

Quản lý nhóm Zalo

Overview

This node manages Zalo groups by interacting with the Zalo API. Specifically, for the "Lấy Danh Sách Thành Viên" (Get Group Members) operation under the "Group" resource, it retrieves a list of members from a specified Zalo group. This is useful for scenarios where you need to monitor or process group membership data, such as syncing group members with another system, auditing group composition, or managing group roles.

For example, you might use this node to:

  • Fetch up to a certain number of members from a Zalo group to display in a dashboard.
  • Retrieve current admins and members to verify group permissions.
  • Automate notifications or actions based on group membership changes.

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 fetch (limit).

Output

The output JSON contains detailed information about the group's membership:

{
  "members": ["memberId1", "memberId2", "..."],       // Array of member IDs limited by 'Giới Hạn'
  "admins": ["adminId1", "adminId2", "..."],          // Array of admin user IDs in the group
  "currentMems": [...],                                // Additional current members info (structure depends on API)
  "updateMems": [...],                                 // Updated members info (structure depends on API)
  "totalMember": 123                                  // Total number of members in the group
}
  • members: A sliced array of member IDs up to the requested limit.
  • admins: List of admin user IDs.
  • currentMems and updateMems: Additional arrays related to membership status or updates.
  • totalMember: The total count of members in the group.

No binary data output is produced by this operation.

Dependencies

  • Requires valid Zalo API credentials including an API key credential that provides cookie, IMEI, and user agent information.
  • The node uses the zca-js library to interact with the Zalo API.
  • Proper configuration of the Zalo API credential in n8n is necessary to authenticate requests.

Troubleshooting

  • Invalid Credentials: If the node throws "No API instance found," ensure that the provided Zalo API credentials are correct and include valid cookie, IMEI, and user agent values.
  • Group Not Found or Access Denied: Errors may occur if the group ID is invalid or the authenticated user does not have permission to access the group. Verify the group ID and user permissions.
  • Limit Exceeds Available Members: If the limit exceeds the actual number of members, the node will return all available members without error.
  • Network or API Errors: Temporary network issues or API rate limits can cause failures. Use the "Continue On Fail" option to handle such cases gracefully.

Links and References

Discussion