Overview
This node is designed to interact with a Redis database to manage chat thread messages. It retrieves stored messages for a given unique chat thread ID, appends a new message to the list, waits for a specified time, then deletes the stored thread key and returns the updated list of messages. This functionality can be useful in scenarios where you want to accumulate messages over a short period before processing or forwarding them, such as batching chat messages or implementing debounce logic in messaging workflows.
Practical examples:
- Collecting multiple user inputs in a chat thread before sending a consolidated response.
- Implementing a delay to gather messages in a group chat before triggering an action.
- Managing temporary message storage and retrieval in chatbot integrations.
Properties
| Name | Meaning |
|---|---|
| Đây là phiên bản Thử nghiệm Chúng tôi sẽ liên tục cập nhât và sửa lỗi. Mời bạn truy cập https://zalo.me/g/ebsiof941 để cập nhật thông tin mới nhất |
A notice informing users that this is an experimental version and providing a link for updates. |
| ID nhóm chat | The unique identifier (thread_id) of the chat group/thread to retrieve and update messages. |
| Nội dung tin nhắn | The content of the message to append to the existing messages in the thread. |
| Thời gian chờ | Wait time in seconds before deleting the stored thread key and returning results. |
Output
The node outputs JSON data containing the updated list of messages for the specified chat thread. The output structure includes:
messages: An array of strings representing all messages currently stored for the thread.content: A single string concatenating all messages separated by spaces.
If no messages exist after processing, the node returns empty arrays.
No binary data output is produced by this node.
Example output JSON:
{
"messages": ["message1", "message2", "new message"],
"content": "message1 message2 new message"
}
Dependencies
- Requires a Redis server connection configured via credentials including host, port, username, password, and optional TLS.
- Uses the
redisnpm package to connect and interact with Redis. - The node expects proper Redis credentials to be set up in n8n for authentication.
- No other external services are required.
Troubleshooting
- Connection issues: If the node cannot connect to Redis, verify the Redis server address, port, credentials, and network accessibility.
- Authentication errors: Ensure the provided API key credential (username/password) is correct and has access rights.
- Timeouts or delays: The node uses a wait time property; setting it too low may cause unexpected behavior if Redis operations are slow.
- Empty message list: If the thread ID does not exist in Redis, the node initializes it but may return empty until messages are appended.
- Redis command failures: Check Redis server logs and ensure the commands used (
get,set,del) are supported and not blocked.