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 recent chat conversations. It is useful for scenarios where you want to monitor or process recent interactions between your OA and users, such as customer support follow-ups, analytics on user engagement, or automating responses based on recent chats.
For example, you can use this node to fetch the latest 10 conversations starting from an offset, then analyze or route these conversations in your workflow for further processing like sending messages or updating CRM records.
Properties
| Name | Meaning |
|---|---|
| Vị Trí Bắt Đầu (offset) | The starting position (offset) from which to begin fetching the list of recent chats. Default is 0. |
| Số Lượng (count) | The number of recent chat conversations to retrieve. Maximum allowed is 50. Default is 10. |
Output
The node outputs a JSON object containing the response from the Zalo OA API endpoint /oa/listrecentchat. The structure includes:
- A
datafield with an array of recent chat conversation objects. - Each conversation object typically contains identifiers and metadata about the chat.
- Additional fields may include status codes or messages from the API.
If an error occurs, the output JSON will contain an error flag set to true, along with a descriptive message, optional note, and a suggestion for troubleshooting.
No binary data output is produced by this operation.
Dependencies
- Requires a valid access token credential for Zalo Official Account API authentication.
- The node uses the Zalo OA API v2.0 endpoint:
https://openapi.zalo.me/v2.0/oa/listrecentchat. - Proper permissions must be granted to the access token, specifically rights to manage and read message conversations.
- The node expects the environment or workflow static data to provide tokens or falls back to credentials configured in n8n.
Troubleshooting
Common Issues:
- Invalid or expired access token leading to authentication errors.
- Insufficient permissions on the OA access token to read recent chats.
- Exceeding the maximum allowed count (more than 50).
- Network or API endpoint issues.
Error Messages:
"Lỗi khi gọi API listrecentchat:"followed by the error message indicates failure in calling the API. Check the access token validity and permissions.- If the response contains an error object with suggestions, follow them to verify token scopes and parameters.
"Vui lòng kiểm tra lại quyền truy cập của OA và access_token."suggests checking the OA permissions and token correctness.
Resolutions:
- Refresh or reauthenticate the access token.
- Ensure the OA has granted the necessary message management permissions.
- Limit the
countparameter to 50 or less. - Verify network connectivity and API endpoint availability.