Actions38
- Zalo OA Actions
- Gửi Tin Nhắn Văn Bản Vào Nhóm
- 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
- Gửi Tin Tư Vấn Kèm Ả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 operation updates the menu of a Zalo Official Account (OA). It allows users to define and send a list of menu items to customize the OA's interactive menu that appears to end-users. This is useful for businesses or service providers who want to provide quick access to various actions such as opening URLs, sending messages, making phone calls, or launching apps directly from their Zalo OA menu.
Practical examples include:
- Adding menu items that link to promotional web pages.
- Creating menu options that send predefined messages to the OA.
- Providing direct call buttons for customer support.
- Launching specific applications related to the business.
Properties
| Name | Meaning |
|---|---|
| Menu Items | A collection 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 type of action triggered when the user clicks the menu item. | |
| Options: "Mở URL" (open URL), "Gửi Tin Nhắn" (send message), "Gọi Điện" (make phone call), "Mở Ứng Dụng" (open app). | |
| - Giá Trị (payload): The value corresponding to the selected menu type (e.g., URL, message text, phone number, app identifier). |
Output
The node outputs JSON data representing the response from the Zalo OA API after attempting to update the menu. This typically includes success confirmation or error details returned by the API.
No binary data output is involved in this operation.
Dependencies
- Requires an active and valid API authentication token (access token) for the Zalo Official Account.
- The node uses the Zalo OpenAPI endpoint
https://openapi.zalo.me/v3.0/oa/menuto update the menu. - Proper permissions must be granted to the API token to manage the OA menu.
- The node depends on the
axiosHTTP client library for making API requests.
Troubleshooting
Common Issues:
- Invalid or expired access token leading to authentication errors.
- Incorrectly formatted menu items or missing required fields.
- Insufficient permissions for the API token to update the OA menu.
- Network connectivity issues preventing API communication.
Error Messages and Resolutions:
- Authentication errors: Ensure the API token is valid and refreshed if expired.
- Validation errors: Check that each menu item has a valid title, type, and payload matching the expected format.
- Permission denied: Verify that the API token has the necessary scopes to modify the OA menu.
- API request failures: Review network settings and retry the operation.
Links and References
Summary of execute() logic for Resource: Zalo OA, Operation: Cập Nhật Menu OA
- Retrieves the OAuth access token from stored credentials or environment variables.
- Reads the input parameter "Menu Items", which is a collection of menu item objects.
- Maps each menu item into the structure expected by the Zalo API, converting the type and payload accordingly.
- Sends a POST request to the
/menuendpoint of the Zalo OA API with the constructed menu items. - Returns the API response JSON as output for each input item processed.