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 OA management tasks. Specifically, the "Xóa Tag" (Remove Tag) operation allows users to delete a tag from their Zalo OA. This is useful for maintaining an organized tagging system by removing obsolete or incorrect tags.

Practical scenarios include:

  • Cleaning up tags that are no longer relevant.
  • Managing user segmentation by removing outdated tags.
  • Automating tag lifecycle management in marketing workflows.

Example: Automatically remove a tag identified by its ID after a campaign ends to keep the tag list current.

Properties

Name Meaning
Tag ID The unique identifier of the tag to be removed.

Output

The node outputs a JSON object containing the response from the Zalo OA API after attempting to remove the specified 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": "Tag removed successfully",
  // other fields depending on API response
}

If the removal fails, the output will contain an error flag and descriptive message explaining the failure.

Dependencies

  • Requires an active Zalo Official Account API access token credential configured in n8n.
  • Uses the Zalo OA API endpoint https://openapi.zalo.me/v3.0/oa/tag/rmtag.
  • HTTP requests are made using Axios library.
  • Content-Type header is set to application/json.

Troubleshooting

  • Common issues:

    • Invalid or expired access token leading to authentication errors.
    • Providing a non-existent or incorrect Tag ID.
    • Insufficient permissions on the Zalo OA to modify tags.
  • Error messages and resolutions:

    • "error": true with message about invalid token: Refresh or reconfigure the API credentials.
    • "error": true with message indicating tag not found: Verify the Tag ID is correct and exists.
    • Network or timeout errors: Check network connectivity and API availability.

Ensure the access token has the necessary scope to manage tags on the Zalo OA.

Links and References

Discussion