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, enabling automation and management of various OA features. Specifically, the "Cập Nhật Menu OA" (Update OA Menu) operation allows users to update the menu items displayed on their Zalo Official Account.
Typical use cases include:
- Customizing the OA menu to provide quick access links or actions for users.
- Updating menu options dynamically based on campaigns or user interactions.
- Integrating with other workflows to automate menu changes without manual intervention.
For example, a business can set menu items that open URLs, send predefined messages, initiate phone calls, or open apps directly from the Zalo chat interface.
Properties
| Name | Meaning |
|---|---|
| Menu Items | A list of menu items to be set on the OA menu. Each item includes: |
| - Tên Menu (title): The display name of the menu item. | |
| - Loại Menu (type): The action type when the user clicks the menu item. Options are: | |
| - Mở URL (Open URL) | |
| - Gửi Tin Nhắn (Send Message) | |
| - Gọi Điện (Call Phone) | |
| - Mở Ứng Dụng (Open App) | |
| - Giá Trị (payload): The value corresponding to the selected type (e.g., URL, message text, phone number, app identifier). |
Output
The output is a JSON object representing the response from the Zalo OA API after attempting to update the menu. It typically contains status information about the success or failure of the update request.
Example structure (simplified):
{
"error": 0,
"message": "Success",
"data": {
// Additional data returned by the API
}
}
If an error occurs, the output JSON will contain error details such as:
{
"error": 1,
"message": "Error description here"
}
No binary data output is involved in this operation.
Dependencies
- Requires an API authentication token (access token) for the Zalo Official Account API.
- Uses the Zalo OA API endpoint at
https://openapi.zalo.me/v2.0/oa/menu. - The node depends on the
axiosHTTP client library for making API requests. - Proper permissions must be granted to the API token to allow menu updates.
Troubleshooting
Common Issues
- Invalid or expired access token: The API call will fail if the access token is missing, invalid, or expired.
- Incorrect menu item payloads: Payload values must match the expected format for each menu type (e.g., valid URLs for "Open URL", valid phone numbers for "Call Phone").
- API permission errors: The token must have sufficient rights to update the OA menu.
- Network or connectivity issues: Failures in reaching the Zalo API endpoint.
Error Messages and Resolutions
"error": 1, "message": "Invalid access token"
Resolution: Verify and refresh the API token credentials."error": 1, "message": "Invalid menu item payload"
Resolution: Check that the payload matches the required format for the selected menu type.Network errors or timeouts
Resolution: Ensure stable internet connection and that the Zalo API service is reachable.Unexpected API responses or failures
Resolution: Review API documentation for any changes; check if the OA account has necessary permissions.
Links and References
- Zalo Official Account API Documentation
- Zalo OA Menu Management Guide
- n8n Documentation on Creating Custom Nodes
This summary focuses exclusively on the "Cập Nhật Menu OA" operation within the Zalo OA resource, describing its input properties, output, dependencies, and troubleshooting tips based on static analysis of the provided source code.