Zalo OA icon

Zalo OA

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

Overview

This node interacts with the Zalo Official Account (OA) API, enabling automation of various tasks related to managing followers, messages, articles, products, categories, orders, and tags within a Zalo OA. Specifically, the "Cập Nhật Thông Tin Người Theo Dõi" (Update Follower Information) operation allows users to update specific information fields of a follower by their user ID.

Common scenarios for this operation include:

  • Keeping follower contact details up-to-date (e.g., phone number, email).
  • Updating demographic or personal information such as birthday or city.
  • Correcting or enriching follower profiles to improve personalized communication.

Practical example:

  • A marketing automation workflow updates a follower's phone number after they submit a form on a website.
  • Customer support updates the address or birthday of a follower based on new information received.

Properties

Name Meaning
User ID The unique identifier of the follower whose information you want to update.
Thông Tin The type of information to update. Options: Họ Tên (name), Số Điện Thoại (phone), Email, Địa Chỉ (address), Thành Phố (city), Ngày Sinh (birthday).
Giá Trị The new value for the selected information field. For birthday, use the format YYYY-MM-DD.

Output

The output is a JSON object representing the response from the Zalo OA API after attempting to update the follower's information. It typically contains success status and any relevant data or error messages returned by the API.

Example structure:

{
  "error": false,
  "message": "Success",
  // other API-specific response fields
}

If an error occurs, the output JSON includes:

  • error: true
  • message: description of the error
  • response: detailed API error response if available
  • suggestion: advice on how to resolve the issue

Dependencies

  • Requires an active Zalo Official Account API access token credential configured in n8n.
  • Uses the Zalo OA API endpoint at https://openapi.zalo.me/v2.0/oa.
  • Depends on the axios HTTP client library for making API requests.

Troubleshooting

Common Issues

  • Invalid or expired access token leading to authentication errors.
  • Incorrect user ID causing the API to fail to find the follower.
  • Improperly formatted birthday date (should be YYYY-MM-DD).
  • Insufficient permissions granted to the API token for updating follower info.

Error Messages and Resolutions

  • Error when updating follower info:
    Message includes the API error detail.
    Resolution: Verify the user ID is correct, ensure the access token has proper permissions, and check that the data format (especially for birthday) is valid.

  • No binary data property exists:
    Not applicable for this operation but may appear in other operations involving file uploads.

  • API rate limits or network errors:
    Retry after some time or check network connectivity.

Links and References

Discussion