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 interacts with the Zalo Official Account (OA) API to retrieve a list of categories associated with the OA. It is useful for workflows that need to manage or display category data from a Zalo OA, such as organizing products, posts, or tags into categories.
A common scenario is when you want to fetch a paginated list of categories to show in a dashboard or to use their IDs/names for further operations like assigning categories to products or filtering content.
For example, you can use this node to:
- Retrieve the first 10 categories starting from offset 0.
- Paginate through categories by adjusting the offset and count parameters.
- Use the returned category IDs and names to tag or organize other OA resources.
Properties
| Name | Meaning |
|---|---|
| Vị Trí Bắt Đầu (offset) | The starting position (offset) in the list of categories to begin fetching from. Default is 0. |
| Số Lượng (count) | The number of categories to retrieve in one call. Default is 10. Maximum allowed is 50. |
Output
The output JSON contains the response from the Zalo OA API endpoint that returns the category list. The structure includes:
data: An array of category objects, each containing:tag_id(orid): The unique identifier of the category.tag_name(orname): The name of the category.display_info: A string combining the ID and name for easy display (e.g., "ID: 12345 - Name: CategoryName").
message: A message indicating success, e.g., "Lấy danh sách tag thành công" ("Successfully retrieved tag list").example: An example note suggesting how to use the tag_id or tag_name values in other nodes for tagging users.
If an error occurs, the output JSON will contain:
error: truemessage: Error descriptionresponse: Raw API response details if availablesuggestion: Tips on how to resolve the issue
No binary data output is involved in this operation.
Dependencies
- Requires a valid Zalo Official Account API access token with appropriate permissions.
- The node expects the access token to be provided via credentials or fetched from environment variables or database storage.
- Uses the Zalo OA API endpoint:
https://openapi.zalo.me/v3.0/oa/store/category/getcategoryofoa - HTTP requests are made using Axios library.
- No additional external services beyond Zalo OA API are required.
Troubleshooting
Common Issues
- Invalid or expired access token: The API call will fail if the access token is missing, invalid, or expired.
- Insufficient permissions: The token must have permission to read category information.
- Incorrect offset/count values: Using negative offsets or counts exceeding the maximum limit (usually 50) may cause errors.
- Network or API downtime: Temporary network issues or Zalo API outages can cause request failures.
Common Error Messages and Resolutions
"Error getting category list: <error message>"
Check your access token validity and permissions. Refresh or reauthenticate if necessary."Please check the parameters and OA access permissions."
Verify that the offset and count parameters are within allowed ranges and that the OA has granted the required scopes.If the response contains an error object with detailed API response, review the status code and message for clues (e.g., 401 Unauthorized means token issues).
Links and References
- Zalo Official Account API Documentation
- Zalo OA API - Get Category List Endpoint
- n8n Documentation on Creating Custom Nodes
This summary is based solely on static analysis of the provided source code and property definitions.