Zalo OA icon

Zalo OA

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

Overview

The "Zalo OA" node integrates with the Zalo Official Account (OA) API, enabling users to manage and interact with their Zalo OA content programmatically. Specifically, the "Tạo Bài Viết" (Create Article) operation allows users to create new articles on their Zalo Official Account.

This operation is useful for automating content publishing workflows, such as:

  • Automatically posting news updates or blog posts from external sources.
  • Scheduling and managing marketing content on Zalo OA.
  • Integrating content creation into broader automation pipelines involving customer engagement.

For example, a business could use this node to publish promotional articles with cover images and descriptions directly from their CMS or CRM system without manual intervention.

Properties

Name Meaning
Tiêu Đề Bài Viết The title of the article to be created.
Mô Tả Bài Viết A short description or summary of the article.
Tác Giả The name of the author of the article.
URL Ảnh Bìa The URL of the cover photo image for the article.
Trạng Thái Ảnh Bìa Display status of the cover photo; options are "Hiển Thị" (show) or "Ẩn" (hide).
Nội Dung Bài Viết The main content body of the article, supporting HTML formatting.
Trạng Thái Bài Viết Display status of the article itself; options are "Hiển Thị" (show) or "Ẩn" (hide).
Cho Phép Bình Luận Whether to allow user comments on the article; options are "Cho Phép" (allow) or "Không Cho Phép" (disallow).

Output

The output JSON contains the response from the Zalo OA API after attempting to create the article. This typically includes:

  • Confirmation of the article creation.
  • Details about the created article such as its ID/token.
  • Status messages or error information if the creation failed.

If an error occurs, the output JSON will include fields like error, message, and possibly detailed API response data to help diagnose the issue.

The node does not output binary data for this operation.

Dependencies

  • Requires an API access token credential for authenticating requests to the Zalo Official Account API.
  • Uses the Zalo OA API endpoint: https://openapi.zalo.me/v2.0/article/create.
  • The node depends on the axios HTTP client library for making API requests.
  • Proper permissions must be granted to the API token to create articles on the Zalo OA.

Troubleshooting

Common Issues

  • Invalid or expired access token: The API call will fail if the access token is missing, invalid, or expired.
  • Invalid cover photo URL: The cover photo URL must be accessible and valid; otherwise, the API may reject the request.
  • Missing required fields: The title and content body are mandatory; omitting them will cause errors.
  • API rate limits or permission issues: Insufficient permissions or hitting API limits can cause failures.

Error Messages and Resolutions

  • "Lỗi khi tạo bài viết: <message>" — Indicates failure in creating the article. Check the message for specifics.
  • If the response includes HTTP status codes or detailed error data, verify:
    • Access token validity and scopes.
    • Correctness and accessibility of the cover photo URL.
    • That all required parameters are provided and correctly formatted.
  • Ensure the article content supports HTML as expected by the API.
  • Review the latest Zalo OA API documentation for any changes or additional requirements.

Links and References

Discussion