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 with Zalo OA features. Specifically, the "Xóa Người Theo Dõi Khỏi Tag" operation allows you to remove a follower (user) from a specific tag within your Zalo OA. This is useful for managing segmented user groups or cleaning up tags when followers no longer belong to certain categories.

Common scenarios include:

  • Managing marketing segments by removing users from outdated or irrelevant tags.
  • Automating follower list maintenance based on user behavior or status changes.
  • Integrating with other workflows that update user tags dynamically.

Example: If you have tagged followers based on their interests and a user unsubscribes from a category, you can use this operation to automatically remove them from the corresponding tag.

Properties

Name Meaning
User ID The unique identifier of the follower (user) to be removed from the specified tag.
Tag ID The unique identifier of the tag from which the follower should be removed.

Output

The node outputs a JSON object containing the response from the Zalo OA API after attempting to remove the follower from the tag. The structure typically includes success status and any relevant messages or error details returned by the API.

Example output JSON structure:

{
  "error": false,
  "message": "Success",
  "data": {
    // Additional data depending on API response
  }
}

If the operation fails, the output will contain an error field set to true along with an error message and possibly additional diagnostic information.

The node does not output binary data for this operation.

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.
  • Requires network connectivity to Zalo's API servers.
  • The node depends on the axios HTTP client library for making API requests.

Troubleshooting

Common Issues

  • Invalid or expired access token: The API call will fail if the access token is missing, invalid, or expired.
  • Incorrect User ID or Tag ID: Providing wrong identifiers will cause the API to return errors indicating the user or tag was not found.
  • Insufficient permissions: The access token must have the necessary scopes to manage tags and followers.
  • Network issues: Connectivity problems may cause request failures.

Error Messages and Resolutions

  • "Lỗi khi gọi API ..." (Error calling API): Indicates a failure in the API request. Check the access token validity and permissions.
  • "No binary data property ... exists on item.": Not applicable for this operation but common in upload operations; ensure correct binary property names.
  • API response errors often include HTTP status codes and messages. Review these to adjust parameters or credentials accordingly.

To resolve errors:

  • Verify the access token is valid and has required permissions.
  • Confirm the User ID and Tag ID are correct and exist in your Zalo OA.
  • Check network connectivity.
  • Review Zalo OA API documentation for any recent changes.

Links and References

Discussion