Implement intelligent message buffering for AI chats with Redis and GPT-4-mini
Ready for 3.0What this workflow does
This AI workflow has 16 nodes and runs when a chat message arrives. Along the way it connects Redis, OpenAI Chat Model and Redis Chat Memory.
How it runs
Trigger: When a chat message arrives.
- store (Redis): push
- count (Redis): incr
- check_first_message (If): checks a condition and branches into true / false
- timestamp (Redis): set
- Wait: pauses before continuing
- get_timestamp (Redis): get
- check_delay (If): checks a condition and branches into true / false
- extract (Redis): pop
- get_message (Redis): get
- set_message (Redis): set
…plus 2 more steps. See the full node list below.
Services it uses
Other OpenAI + Redis templates (36)
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (8)
- If
n8n-nodes-base.if - Redis
n8n-nodes-base.redis - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - No Operation, do nothing
n8n-nodes-base.noOp - AI Agent
@n8n/n8n-nodes-langchain.agent - Redis Chat Memory
@n8n/n8n-nodes-langchain.memoryRedisChat - Chat Trigger
@n8n/n8n-nodes-langchain.chatTrigger - Wait
n8n-nodes-base.wait
From the author
This workflow solves a critical problem in AI chat implementations: handling multiple rapid messages naturally without creating processing bottlenecks. Unlike traditional approaches where every user waits in the same queue, our solution implements intelligent…