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. 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 communications.

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 roles.
  • 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 members:

{
  "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 array related to current members (exact meaning depends on API)
  "updateMems": [...],                                 // Additional array possibly indicating updated members
  "totalMember": 123                                  // Total number of members in the group
}
  • members: A sliced list of member IDs up to the requested limit.
  • admins: List of admin user IDs in the group.
  • currentMems and updateMems: Additional member-related arrays provided by the API.
  • 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 credentials in n8n is necessary to authenticate requests.

Troubleshooting

  • Invalid Credentials: If the node throws "No API instance found," it indicates invalid or missing credentials. Ensure the API key credential is correctly configured with valid cookie, IMEI, and user agent values.
  • Group Not Found or Access Denied: Errors may occur if the provided group ID does not exist or the authenticated user lacks permission. Verify the group ID and permissions.
  • Limit Exceeds Available Members: Setting a limit higher than the actual number of members will simply return all available members without error.
  • Network or API Errors: Temporary network issues or API downtime can cause failures. Retrying or checking API status may help.
  • When continueOnFail is enabled, errors for individual items are returned in the output JSON under an error field instead of stopping execution.

Links and References

Discussion