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 automation of various interactions and management tasks related to 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 personal information fields of a follower by their user ID.

Typical use cases include:

  • Keeping follower contact details up-to-date automatically after receiving new data.
  • Correcting or enriching follower profiles in bulk or triggered workflows.
  • Synchronizing follower information from other systems into Zalo OA.

For example, you might update a follower's phone number or birthday when that information changes in your CRM system, ensuring your Zalo OA has the latest data for personalized messaging or segmentation.

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 type. For birthday, use the format YYYY-MM-DD.

Output

The node outputs a JSON object representing the response from the Zalo OA API after attempting to update the follower's information. This typically includes success status and any relevant messages or error details returned by the API.

Example output structure (simplified):

{
  "error": false,
  "message": "Success",
  "data": {
    // API-specific response details about the update
  }
}

If an error occurs, the output JSON will contain an error field set to true, a descriptive message, and possibly additional response data from the API explaining the failure.

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/v3.0/oa/user/update.
  • The node depends on the axios HTTP client library for making API requests.
  • Proper permissions must be granted to the access token, specifically rights to manage follower information.

Troubleshooting

Common Issues

  • Invalid or expired access token: The API call will fail if the access token is missing, invalid, or expired. Ensure the credential is correctly configured and refreshed as needed.
  • Insufficient permissions: If the access token lacks the required scope to update follower info, the API will reject the request.
  • Incorrect user ID: Providing a non-existent or malformed user ID will cause the update to fail.
  • Invalid data format: For example, the birthday must be in YYYY-MM-DD format; otherwise, the API may return an error.

Error Messages and Resolutions

  • "Lỗi khi cập nhật thông tin người dùng: <message>": Indicates an error during the update process. Check the detailed message and API response for clues.
  • Suggestions often include verifying the user ID, ensuring the access token has proper permissions, and confirming the data format matches API requirements.
  • Network or connectivity issues can also cause failures; verify network access to the Zalo API endpoint.

Links and References

Discussion