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
The "Zalo OA" node integrates with the Zalo Official Account (OA) API, enabling automation of various interactions and management tasks related to a Zalo OA. Specifically, the Upload File operation allows users to upload files to the Zalo OA platform either by providing a direct URL or by uploading binary file data from previous workflow steps.
This operation is useful in scenarios where you want to programmatically add files (documents, PDFs, etc.) to your Zalo OA for messaging or content management purposes. For example, you might automate sending files to followers or storing files in the OA's media library.
Properties
| Name | Meaning |
|---|---|
| Binary Data | Boolean flag indicating if the file to upload is provided as binary data (true) or as a URL (false). |
| Binary Property | The name of the binary property containing the file data when Binary Data is true. This must match the binary field name from previous nodes. |
| URL File | The URL of the file to upload when Binary Data is false. |
Output
The node outputs JSON data representing the response from the Zalo OA API after attempting to upload the file. The structure typically includes success status, file identifiers, URLs, or error information if the upload failed.
If the upload is successful, the output JSON contains details about the uploaded file as returned by the Zalo OA API.
If an error occurs during upload, the output JSON will contain:
error:truemessage: Description of the errorresponse: The raw response data from the API (if available)suggestion: Guidance on how to resolve common issues (e.g., checking file format or access permissions)
The node does not output binary data itself; it only returns metadata about the uploaded file.
Dependencies
- Requires an API authentication token credential for Zalo OA to authorize requests.
- Uses the Zalo OA REST API endpoint at
https://openapi.zalo.me/v3.0/oa/upload/file. - Depends on the
axiosHTTP client for making API requests. - Uses
form-datapackage to handle multipart form uploads when sending binary data.
Troubleshooting
Common Issues
- Missing binary data property: If
Binary Datais enabled but the specified binary property does not exist on the input item, the node throws an error indicating the missing property. - Invalid file format or unsupported file type: The Zalo OA API may reject files that are not supported or improperly formatted.
- Access token or permission errors: Uploads can fail if the API token is invalid, expired, or lacks necessary permissions.
- Network or API errors: Connectivity issues or API downtime can cause failures.
Error Messages and Resolutions
No binary data property "<property>" exists on item.
Resolution: Verify that the binary property name matches exactly the binary field from previous nodes.Error uploading file: <message>
Resolution: Check the file format, size, and ensure the OA has granted the required access permissions. Also verify the validity of the access token.API response errors with status codes and messages are logged and included in the output JSON under
responsefor further diagnosis.
Links and References
- Zalo Official Account API Documentation
- Zalo OA Upload File API Reference (general reference, actual endpoint used:
/v3.0/oa/upload/file)