Lịch Sử Chat Cá Nhân
AI-generatedOverview
This node fetches the personal chat history of a user from Zalo, a popular messaging platform. It supports retrieving messages with options for pagination, sorting, date filtering, and including message reactions. This node is useful for scenarios where users want to analyze or archive their chat conversations, monitor communication, or integrate chat data into other workflows.
Use Case Examples
- A user wants to export their entire chat history with a specific contact for backup purposes.
- A business wants to analyze customer support chat logs to improve service quality.
- A developer integrates chat history retrieval into a CRM system to provide context for customer interactions.
Properties
| Name | Meaning |
|---|---|
| ID Người Dùng | The user ID to fetch chat history for, required to identify the chat thread. |
| Chế Độ Lấy Dữ Liệu | Whether to fetch all messages automatically by paginating until no more messages are left. |
| Số Lượng Tin Nhắn | Maximum number of messages to return when not fetching all. |
| Thời Gian Chờ Giữa Các Lần Lấy (Ms) | Delay in milliseconds between requests when fetching all messages to avoid being blocked. |
| ID Tin Nhắn Cuối | ID of the last message for pagination; leave empty to fetch the newest messages. |
| Bao Gồm Cảm Xúc | Whether to include reactions for messages, which may slow down the process. |
| Sắp Xếp | Sort order of messages by time, either newest first or oldest first. |
| Từ Ngày (Tùy Chọn) | Optional start date to filter messages from this time onward. |
| ĐếN Ngày (Tùy Chọn) | Optional end date to filter messages up to this time. |
Output
JSON
success- Indicates if the operation was successful.operation- The operation performed, e.g., getUserHistory.threadId- The ID of the chat thread (user ID).threadType- Type of the thread, e.g., personal or group chat.messages- Array of retrieved chat messages.hasMore- Boolean indicating if there are more messages to fetch (pagination).lastMsgId- ID of the last message fetched, useful for pagination.totalCount- Total number of messages available in the chat history.error- Error message if the operation failed.
Dependencies
- Requires Zalo API credentials and a WebSocket listener for real-time communication with Zalo service.
Troubleshooting
- Common issues include failure to initialize the Zalo API due to incorrect or missing credentials. Ensure valid API keys and authentication tokens are provided.
- WebSocket listener connection timeout or not started can cause the node to fail. Verify the WebSocket listener is running and connected properly.
- Errors fetching chat history may occur if the user ID is invalid or the API rate limits are exceeded. Check the user ID and consider adjusting delayBetweenRequests to avoid blocking.
- If the node throws errors related to JSON parsing or unexpected response formats, ensure the Zalo API service is operational and the node version is compatible.
Links
- Zalo Chat History API Documentation - Official documentation for Zalo chat history API endpoints and usage.
- Zalo Chat History by diginno.net - Resource and toolset for accessing Zalo chat history, referenced in the node description.