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 the conversation history of a specific user. It is useful for scenarios where you want to analyze or process past chat messages between your OA and a user, such as customer support follow-ups, chat analytics, or automated message processing.
For example, you can use this node to fetch the last 10 messages starting from a certain position in the conversation with a user identified by their User ID.
Properties
| Name | Meaning |
|---|---|
| User ID | The unique identifier of the user whose conversation history you want to retrieve. |
| Vị Trí Bắt Đầu | The offset position to start fetching messages from within the conversation (starting point). |
| Số Lượng | The number of messages to retrieve, with a maximum limit of 50 messages per request. |
Output
The output is a JSON object containing the conversation history data returned by the Zalo OA API. This typically includes an array of messages with details such as message content, timestamps, sender information, and possibly metadata related to each message.
No binary data output is produced by this operation.
Dependencies
- Requires a valid API access token credential for the Zalo Official Account.
- The node uses the Zalo OA API endpoint
https://openapi.zalo.me/v3.0/oa/conversationto fetch conversation data. - Proper permissions must be granted to the API token, specifically the permission to manage and read user messages.
- The node expects the environment or workflow static data to provide valid tokens or falls back to credentials configured in n8n.
Troubleshooting
Common Issues:
- Invalid or expired access token: Ensure that the API key or token used has not expired and has the necessary permissions.
- Incorrect User ID: Verify that the User ID provided corresponds to a valid user who has interacted with the OA.
- Offset or count parameters out of range: The count should not exceed 50; offset should be a non-negative integer.
Error Messages:
- Errors related to API calls will include messages indicating failure to fetch conversation history, often accompanied by HTTP status codes.
- If the node returns an error with a suggestion to check permissions or tokens, verify that the OA access token is valid and has the required scopes.
- Network or connectivity errors may occur if the Zalo API endpoint is unreachable.
Resolution Steps:
- Refresh or reconfigure the API authentication token.
- Double-check input parameters for correctness.
- Consult Zalo OA API documentation for any changes or updates to endpoints or required permissions.
Links and References
- Zalo Official Account API Documentation
- Zalo OA Conversation API Reference (for detailed parameters and response structure)