Actions36
- Zalo OA Actions
- Gửi Tin Nhắn Văn Bản
- Gửi Tin Nhắn Hình Ảnh
- Gửi Tin Nhắn File
- Gửi Tin Nhắn Danh Sách
- Lấy Thông Tin Người Theo Dõi
- Lấy Danh Sách Người Theo Dõi
- Cập Nhật Thông Tin Người Theo Dõi
- Lấy Danh Sách Cuộc Trò Chuyện Gần Đây
- Lấy Lịch Sử Hội Thoại
- Kiểm Tra Trạng Thái Tin Nhắn
- Upload Hình Ảnh
- Upload Hình Ảnh GIF
- Upload File
- Lấy Danh Sách Tag
- Gán Tag Cho Người Theo Dõi
- Xóa Tag
- Xóa Người Theo Dõi Khỏi Tag
- Cập Nhật Menu OA
- Tạo Bài Viết
- Cập Nhật Bài Viết
- Xóa Bài Viết
- Lấy Danh Sách Bài Viết
- Lấy Chi Tiết Bài Viết
- Chuẩn Bị Upload Video
- Xác Thực Video
- Tạo Sản Phẩm
- Cập Nhật Sản Phẩm
- Lấy Thông Tin Sản Phẩm
- Lấy Danh Sách Sản Phẩm
- Tạo Danh Mục
- Cập Nhật Danh Mục
- Lấy Danh Sách Danh Mục
- Tạo Đơn Hàng
- Cập Nhật Đơn Hàng
- Lấy Thông Tin Đơn Hàng
- Lấy Danh Sách Đơn Hàng
Overview
This node interacts with the Zalo Official Account (OA) API, specifically providing functionality to update an existing article on a Zalo OA. It allows users to modify various aspects of a published article such as its title, description, author, cover image, content, visibility status, and comment permissions.
Typical use cases include:
- Updating marketing or informational articles on a Zalo Official Account without manually logging into the Zalo platform.
- Automating content management workflows where article updates are triggered by external events or data changes.
- Managing article visibility and user interaction settings programmatically.
For example, a business could automatically update product announcement articles with new images and descriptions whenever their inventory changes.
Properties
| Name | Meaning |
|---|---|
| Token Bài Viết | The unique token (ID) of the article to be updated. |
| Tiêu Đề Bài Viết | New title for the article. |
| Mô Tả Bài Viết | New short description of the article. |
| Tác Giả | New author name for the article. |
| URL Ảnh Bìa | New URL of the cover photo for the article. |
| Trạng Thái Ảnh Bìa | Display status of the cover photo; options: "Hiển Thị" (show), "Ẩn" (hide). |
| Nội Dung Bài Viết | New content body of the article, supports HTML formatting. |
| Trạng Thái Bài Viết | Visibility status of the article; options: "Hiển Thị" (show), "Ẩn" (hide). |
| Cho Phép Bình Luận | Whether to allow user comments on the article; options: "Cho Phép" (allow), "Không Cho Phép" (disallow). |
Output
The node outputs a JSON object containing the response from the Zalo OA API after attempting to update the article. This typically includes:
- Confirmation of success or failure.
- Updated article details if successful.
- Error information if the update failed, including error messages and possible suggestions.
No binary data output is involved in this operation.
Example output JSON structure (simplified):
{
"error": false,
"message": "Article updated successfully",
"data": {
"id": "article_token",
"title": "Updated Title",
"author": "New Author",
"description": "Updated description",
"cover": {
"photo_url": "https://new.cover.url/image.jpg",
"status": "show"
},
"body": [
{
"type": "text",
"content": "<p>Updated content</p>"
}
],
"status": "show",
"comment": "show"
}
}
In case of errors, the output JSON will contain fields like error: true, an error message, and possibly a response object with detailed API error info.
Dependencies
- Requires an API authentication token credential for Zalo Official Account API access.
- Uses the Zalo OA API endpoint at
https://openapi.zalo.me/v2.0/article/update. - The node depends on the
axiosHTTP client library for making API requests. - Proper permissions must be granted to the API token to update articles on the Zalo OA.
Troubleshooting
Common Issues
- Invalid or expired token: If the article token is incorrect or the API access token has expired, the update will fail.
- Insufficient permissions: The API token must have rights to manage articles on the Zalo OA.
- Invalid input data: Providing malformed URLs, unsupported HTML content, or invalid option values may cause errors.
- Network or API downtime: Temporary connectivity issues or Zalo API service interruptions can cause failures.
Common Error Messages and Resolutions
"Lỗi khi cập nhật bài viết: <error message>"
Indicates failure during the update process. Check that the article token is correct and the API token is valid.API response errors with status codes (e.g., 401 Unauthorized, 403 Forbidden)
Ensure the API token has the necessary permissions and is not expired.Errors related to cover photo URL or content format
Verify that the cover photo URL is accessible and properly formatted. Confirm that the content HTML is valid."API article/update trong Zalo OA API v3.0 gặp lỗi."
Suggests an issue with the API version or parameters. Review the parameters and ensure compatibility with the latest Zalo OA API documentation.