Templates / Implement intelligent message buffering for AI chats with Redis and GPT-4-mini

Implement intelligent message buffering for AI chats with Redis and GPT-4-mini

Ready for 3.0

by Einar César Santos ✓ · 1,250 views · created 2025-09-04 · Support Chatbot, AI Chatbot

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What 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.

  1. store (Redis): push
  2. count (Redis): incr
  3. check_first_message (If): checks a condition and branches into true / false
  4. timestamp (Redis): set
  5. Wait: pauses before continuing
  6. get_timestamp (Redis): get
  7. check_delay (If): checks a condition and branches into true / false
  8. extract (Redis): pop
  9. get_message (Redis): get
  10. set_message (Redis): set

…plus 2 more steps. See the full node list below.

Services it uses

RedisOpenAI Chat ModelRedis Chat Memory

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)

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…

Excerpt from Einar César Santos's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.