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 manage articles and other OA-related resources programmatically. Specifically, the "Xóa Bài Viết" (Remove Article) operation allows users to delete an existing article from their Zalo OA by providing the article's unique token.

Common scenarios for this node include:

  • Automating content management workflows by removing outdated or irrelevant articles.
  • Integrating Zalo OA article management into broader marketing or CRM automation pipelines.
  • Maintaining a clean and updated set of published articles on Zalo OA without manual intervention.

For example, after a promotional campaign ends, you might use this node to automatically remove related articles from your Zalo OA.

Properties

Name Meaning
Token Bài Viết The unique token identifier of the article to be deleted. This token specifies which article will be removed.

Output

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

Example output JSON structure:

{
  "error": false,
  "message": "Article removed successfully",
  // ... other API response fields
}

If an error occurs, the output JSON will contain an error field set to true, a descriptive message, and possibly additional response data with error details.

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/article/remove.
  • Requires network connectivity to Zalo's API servers.
  • The node uses the axios HTTP client library internally to make API requests.

Troubleshooting

  • Common issues:

    • Invalid or expired access token: Ensure the API token is valid and has not expired.
    • Incorrect article token: Verify that the provided article token corresponds to an existing article.
    • Insufficient permissions: The API token must have rights to delete articles on the Zalo OA.
    • Network or API downtime: Check network connectivity and Zalo API status.
  • Error messages:

    • "Lỗi khi xóa bài viết: <error message>": Indicates failure during the deletion process. Review the error message for specifics.
    • Response status codes like 401 or 403 suggest authentication or authorization problems.
    • If the article does not exist or token is invalid, the API may return a not found or similar error.
  • Resolution tips:

    • Double-check the article token input.
    • Refresh or reconfigure the API access token credential.
    • Confirm that the Zalo OA account has the necessary permissions.
    • Review API documentation for any changes or updates to the endpoint.

Links and References

Discussion