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 Thông Tin Người Theo Dõi" (Get Follower Information) operation retrieves detailed profile information about a specific follower of the OA by their user ID.

Common scenarios for this node include:

  • Fetching user profile details to personalize communication or marketing campaigns.
  • Verifying follower information before sending targeted messages.
  • Integrating follower data into CRM or analytics systems.

Practical example:

  • A business wants to retrieve the name, avatar, and other profile details of a follower who just interacted with their Zalo OA to tailor a follow-up message.

Properties

Name Meaning
User ID The unique identifier of the follower whose information you want to retrieve from Zalo OA.

Output

The output is a JSON object containing the follower's profile information as returned by the Zalo OA API endpoint /v2.0/oa/getprofile. This typically includes fields such as the follower's name, avatar URL, gender, and other public profile details.

If an error occurs during the API call, the output JSON will contain:

  • error: true
  • message: Description of the error encountered.
  • suggestion: Guidance on how to resolve the issue, e.g., ensuring valid access tokens and permissions.

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 base URL: https://openapi.zalo.me/v2.0/oa.
  • Relies on HTTP GET requests with appropriate headers including the access token.

Troubleshooting

  • Common issues:

    • Invalid or expired access token leading to authentication errors.
    • Insufficient permissions granted to the access token for reading follower profiles.
    • Incorrect or non-existent user ID causing the API to return errors.
  • Error messages and resolutions:

    • "Lỗi khi gọi API lấy thông tin người dùng: <error message>"
      Suggests checking that the access token is valid and has the necessary permissions.
    • Network or timeout errors may require verifying network connectivity or retrying later.
    • If the user ID is invalid, confirm the correct follower ID is used.

Links and References

Discussion