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 integrates with the Zalo Official Account (OA) API, enabling users to interact programmatically with various features of a Zalo OA. Specifically, the operation "Lấy Danh Sách Cuộc Trò Chuyện Gần Đây" (Get Recent Chat List) retrieves a list of recent conversations from the Zalo OA.
Typical use cases include:
- Monitoring recent user interactions on your Zalo OA.
- Automating responses or analytics based on recent chat activity.
- Integrating Zalo chat data into other workflows or CRM systems.
For example, you might use this node to fetch the last 10 recent chats starting from an offset of 0, then process or analyze these conversations in subsequent workflow steps.
Properties
| Name | Meaning |
|---|---|
| Vị Trí Bắt Đầu (offset) | The starting position index from which to retrieve the recent chat list. Default is 0. |
| Số Lượng (count) | The number of recent conversations to retrieve, with a maximum limit of 50. Default is 10. |
Output
The output is a JSON object containing the response from the Zalo OA API endpoint for recent chats. It typically includes:
- A list of recent chat entries, each representing a conversation.
- Metadata such as total count, pagination info, or status codes depending on the API response.
If an error occurs during the API call, the output JSON will contain fields like:
error: truemessage: Description of the error encountered.noteandsuggestion: Additional guidance to resolve common issues.
No binary data is output by this operation.
Dependencies
- Requires an API authentication token (access token) for the Zalo Official Account API.
- Uses the Zalo OA API base URL:
https://openapi.zalo.me/v2.0/oa. - The node depends on the
axioslibrary for HTTP requests. - Proper permissions must be granted to the access token, specifically the permission to manage and read messages ("Quyền quản lý tin nhắn người quan tâm").
Troubleshooting
Common Issues
- Invalid or expired access token: The API call will fail if the access token is missing, invalid, or expired.
- Insufficient permissions: If the access token lacks the required message management permission, the API will reject the request.
- Exceeding count limits: The
countparameter has a maximum allowed value (50). Requests exceeding this may cause errors or be truncated. - Network or API downtime: Temporary network issues or Zalo API outages can cause failures.
Error Messages and Resolutions
Error when calling listrecentchat:
Message example:"Lỗi khi gọi API lấy danh sách cuộc trò chuyện gần đây: <error details>"
Resolution:- Verify that the access token is valid and has the necessary permissions.
- Ensure the "Quyền quản lý tin nhắn người quan tâm" permission is granted to the app.
- Check network connectivity and retry later if the API service is down.
Parameter validation errors:
If parameters likeoffsetorcountare invalid (e.g., negative numbers), the API may return errors. Use valid numeric values within allowed ranges.
Links and References
- Zalo Official Account API Documentation (official resource for API endpoints and permissions)
- Zalo OA Permissions Guide (details on required permissions for message management)
Note: This summary focuses exclusively on the "Lấy Danh Sách Cuộc Trò Chuyện Gần Đây" operation under the "Zalo OA" resource, as requested.