Message buffer system with Redis for efficient processing
Ready for 3.0What this workflow does
This AI workflow has 27 nodes and runs manually, when you click “Execute workflow” (plus 2 other triggers). Along the way it connects Redis.
How it runs
Trigger: Manually, when you click “Execute workflow” (plus 2 other triggers).
- Mock input data (Edit Fields (Set)): sets 2 fields: context_id, message
- Config Parameters (Edit Fields (Set)): sets 4 fields: minWords, waitLong, waitShort…
- get wait seconds (Code): runs custom JavaScript code
- Buffer messages (Redis): push
- Set buffer_count increment (Redis): incr
- Set last_seen (Redis): set
- Get waiting_reply (Redis): get
- Mod input (Edit Fields (Set)): sets 4 fields: waiting_reply, context_id, message…
- waiting_reply? (If): checks a condition and branches into true / false
- Set waiting_reply (Redis): set
…plus 11 more steps. See the full node list below.
Services it uses
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 (9)
- Manual Trigger
n8n-nodes-base.manualTrigger - No Operation, do nothing
n8n-nodes-base.noOp - Code
n8n-nodes-base.code - Redis
n8n-nodes-base.redis - Edit Fields (Set)
n8n-nodes-base.set - If
n8n-nodes-base.if - Chat Trigger
@n8n/n8n-nodes-langchain.chatTrigger - Wait
n8n-nodes-base.wait - Execute Workflow Trigger
n8n-nodes-base.executeWorkflowTrigger
From the author
🚀 Message-Batching Buffer Workflow (n8n) This workflow implements a lightweight message-batching buffer using Redis for temporary storage and a JavaScript consolidation function to merge messages. It collects incoming user messages per session, waits for a…