Description
Create human-like AI conversations by intelligently grouping rapid-fire messages into one cohesive reply. Designed for chatty users who type one thought at a time β and bots that get it.
πΉ How It Works
π¬ Telegram Bot Trigger β Listens for messages sent in quick bursts
ποΈ Supabase Queueing β Stores each incoming message in a queue (message_queue table)
β±οΈ Buffer Timer β Waits briefly (e.g., 10 seconds) to capture more input
π Message Merging β Combines all queued messages into a single conversation
π§ AI-Powered Reply β Uses OpenAI to respond thoughtfully and in context
π§Ή Queue Cleanup β Deletes all processed messages from the queue
π§© What Problems It Solves
π« Message Spamming β Stops replying to every short message individually
π¬ Smarter Conversations β Waits until the user finishes typing
π§ Context Awareness β Groups ideas for better AI understanding
π± Natural Chat Flow β Makes your bot feel less robotic, more human
π Tech Stack
π² Telegram β Real-time chat input
ποΈ Supabase PostgreSQL β Temporary queue storage
π§ OpenAI GPT-4o / GPT-3.5 β Thoughtful conversation replies
βοΈ n8n β Automation logic and flow management
βοΈ Setup Instructions
π¦ Create a Supabase table named message_queue
π Add columns: user_id (int8), message (text), message_id (int8)
π Connect credentials for Telegram, Supabase, PostgreSQL, and OpenAI
β±οΈ Customize the Wait Time node (default: 10 seconds)
π§ Tune the AI system prompt for tone, intent, or domain
π§ͺ Test by sending 3β4 quick messages in Telegram β watch them merge
π§ How to Customize
π Adjust wait time for faster or slower message grouping
π€ Swap in Claude, DeepSeek, or Mistral instead of OpenAI
π§ Add persistent memory with Google Docs, Supabase, or Notion
π€ Send final replies to WhatsApp, Slack, or web chat apps
π Log interactions to Airtable, Google Sheets, or Notion for analytics
π₯ Ideal For
β
AI chatbot developers crafting human-like flows
β
Telegram or WhatsApp bot builders seeking smooth UX
β
Product teams enhancing conversation flow
β
Customer support bots with intelligent handling
β
n8n power users who want to add smart AI behavior
π Why This Workflow Rocks
π― Itβs conversational, not robotic
π οΈ Fully customizable & scalable
π§ Super smart with AI context
π Reusable across any chat platform
π Insightful, trackable, and fun to use












