Zalo Group icon

Zalo Group

Quản lý nhóm Zalo

Overview

This node interacts with Zalo Groups, specifically providing the operation "Lấy Danh Sách Thành Viên" (Get Group Members). It retrieves a list of members from a specified Zalo group, up to a user-defined limit. This is useful for automating group management tasks, such as auditing group membership, synchronizing group data with other systems, or generating reports on group composition.

Practical examples:

  • Fetching all current members of a Zalo group for HR or community management.
  • Integrating Zalo group member lists into CRM or marketing tools.
  • Monitoring changes in group membership over time.

Properties

Name Type Meaning
ID Nhóm String The unique identifier of the Zalo group whose members you want to fetch.
Giới Hạn Number The maximum number of group members to retrieve.

Output

The output is a JSON object with the following structure:

{
  "members": [/* Array of member IDs (up to the specified limit) */],
  "admins": [/* Array of admin IDs */],
  "currentMems": [/* Array of current member objects/details */],
  "updateMems": [/* Array of recently updated member objects/details */],
  "totalMember": /* Total number of members in the group */
}
  • members: List of member IDs, limited by the "Giới Hạn" property.
  • admins: List of admin IDs in the group.
  • currentMems: Details about current members (structure depends on Zalo API).
  • updateMems: Details about recently updated members.
  • totalMember: Total count of members in the group.

Dependencies

  • Zalo API credentials: Requires valid Zalo API credentials (cookie, IMEI, userAgent) configured in n8n under the credential type zaloApi.
  • zca-js: Uses the zca-js library for interacting with Zalo.
  • n8n configuration: Ensure that the Zalo credential is set up and available to the node.

Troubleshooting

Common issues:

  • Invalid credentials: If the provided Zalo credentials are missing or incorrect, the node will throw an error:
    "No API instance found. Please make sure to provide valid credentials."
    Resolution: Double-check your Zalo API credentials in n8n.

  • Group not found or access denied: If the group ID is invalid or the credentials do not have access, the output may be empty or contain an error message.

  • Limit exceeds actual members: If the "Giới Hạn" value is higher than the actual number of members, only available members will be returned.

  • Error handling: If an error occurs during execution and "Continue On Fail" is enabled, the output will include an error field with the error message.

Links and References

Discussion