Zalo OA icon

Zalo OA

Tương tác với Zalo Official Account API

Overview

This node integrates with the Zalo Official Account (OA) API, enabling users to interact programmatically with their Zalo OA. Specifically, the "Lấy Danh Sách Người Theo Dõi" (Get Followers List) operation retrieves a paginated list of followers of the OA.

Typical use cases include:

  • Fetching follower data for analytics or CRM integration.
  • Automating marketing campaigns by segmenting followers.
  • Synchronizing follower lists with other systems.

For example, you can use this node to pull batches of up to 50 followers starting from a specified offset, then process or store that data elsewhere.

Properties

Name Meaning
Vị Trí Bắt Đầu (offset) The starting position (offset) in the follower list from which to begin fetching followers. Default is 0.
Số Lượng (count) The number of followers to retrieve in one call. Maximum allowed is 50. Default is 10.

Output

The output JSON contains the response from the Zalo OA API endpoint /user/getlist. It typically includes:

  • A list of follower user objects under a data field.
  • Pagination information such as total count and next offset.
  • Status and error messages if applicable.

The exact structure depends on the Zalo OA API but generally provides detailed follower information like user IDs and profile details.

No binary data output is produced by this operation.

Dependencies

  • Requires an active Zalo Official Account API access token credential configured in n8n.
  • Uses the Zalo OA API v3.0 endpoint: https://openapi.zalo.me/v3.0/oa/user/getlist.
  • HTTP requests are made using Axios library.
  • Proper permissions must be granted to the access token to read follower data.

Troubleshooting

  • Common issues:

    • Access token missing or invalid: Ensure the API key credential is correctly set and valid.
    • Insufficient permissions: The OA app must have the "read follower" permission enabled.
    • Exceeding maximum count: The API limits the count parameter to 50; setting higher values will be capped.
    • Network or API errors: Check network connectivity and Zalo API status.
  • Error messages:

    • "Lỗi khi gọi API lấy danh sách người theo dõi: <message>": Indicates failure calling the follower list API. Verify access token validity and permissions.
    • Notes about API changes suggest checking that the OA configuration and access rights are up to date.
  • Resolution tips:

    • Confirm the access token has not expired.
    • Verify the OA app's permissions in the Zalo developer console.
    • Use offsets and counts within allowed ranges.
    • Review API documentation for any recent changes.

Links and References

Discussion