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. The "Cập Nhật Bài Viết" (Update Article) operation allows users to modify various attributes of a published article such as its title, description, author, cover image, content, visibility status, and comment permissions.
Typical use cases include:
- Automatically updating article content or metadata based on external triggers or workflows.
- Managing article visibility or comments dynamically.
- Refreshing cover images or authorship information without manual intervention.
For example, a marketing team could automate updates to promotional articles when new campaign details become available, ensuring the Zalo OA always displays current information.
Properties
| Name | Meaning |
|---|---|
| Token Bài Viết | The unique token identifier of the article to update. |
| 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 image 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 | Comment permission on the article; options: "Cho Phép" (allow), "Không Cho Phép" (disallow). |
Output
The node outputs a JSON object representing the response from the Zalo OA API after attempting to update the article. This typically includes:
- Success indicators and updated article data if the update was 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 will contain fields like error: true, message describing the issue, and possibly a response object with detailed API error data.
Dependencies
- Requires an active Zalo Official Account API access token credential configured in n8n.
- Uses the Zalo OA REST API endpoint at
https://openapi.zalo.me/v2.0/article/update. - HTTP requests are made using Axios library.
- Content-Type header is set to
application/json. - Proper permissions must be granted to the access token to allow article updates.
Troubleshooting
Common Issues
- Invalid or expired token: The provided article token or access token may be invalid or expired, causing authentication failures.
- Incorrect article token: Using a non-existent or wrong article token will result in errors indicating the article cannot be found.
- Invalid URL for cover photo: If the cover photo URL is malformed or inaccessible, the update may fail.
- Permission errors: Insufficient permissions on the access token can cause authorization errors.
- Malformed content: Invalid HTML or unsupported content in the article body might cause API rejection.
Error Messages and Resolutions
"Lỗi khi cập nhật bài viết: <error message>": General failure updating the article. Check the token validity, parameters, and network connectivity.- API response errors with status codes (e.g., 401 Unauthorized, 404 Not Found): Verify that the access token is valid and has required scopes, and that the article token exists.
"Đảm bảo rằng bài viết vẫn tồn tại và URL hình ảnh cover hợp lệ.": Ensure the article still exists and the cover image URL is accessible and correctly formatted.
Links and References
This summary focuses exclusively on the "Cập Nhật Bài Viết" operation of the Zalo OA node as requested.