Allow users to send a sequence of messages to an AI agent in Tel
Use Case When creating chatbots that interface through applications such as Telegram and WhatsApp, users can often sends multiple shorter messages in quick s...
🔌 Nodes & Integrations Used (7)
📖 Implementation & Setup Guide
Use Case When creating chatbots that interface through applications such as **Telegram** and **WhatsApp**, users can often sends multiple shorter messages in quick succession, in place of a single, longer message. This workflow accounts for this behaviour. ### What it Does This workflow allows users to send several messages in quick succession, treating them as one coherent conversation instead of separate messages requiring individual responses. ### How it Works 1. When messages arrive, they are stored in a **Supabase PostgreSQL** table 2. The system waits briefly to see if additional messages arrive 3. If no new messages arrive within the waiting period, all queued messages are: - Combined and processed as a single conversation - Responded to with one unified reply - Deleted from the queue ### Setup 1. Create a table in Supabase called **message_queue**. It needs to have the following columns: **user_id** (`uint8`), **message** (`text`), and **message_id** (`uint8`) 2. Add your **Telegram**, **Supabase**, **OpenAI**, and **PostgreSQL** credentials 3. Activate the workflow and test by sending multiple messages the Telegram bot in one go 4. Wait ten seconds after which you will receive a single reply to all of your messages ### How to Modify it to Your Needs - Change the value of **Wait Amount** in the **Wait 10 Seconds** node in order to to modify the buffering window - Add a **System Message** to the **AI Agent** to tailor it to your specific use case - Replace the **OpenAI** sub-node to use a different language model
⚡ How to import this workflow into n8n:
- Click the Direct Download JSON button above to save
Allow_users_to_send_a_sequence_of_messages_to_an_AI_agent_in_Tel.json. - Log in to your n8n Cloud or self-hosted n8n instance.
- In your workflow canvas, click the menu in top-right and select Import from File (or paste the JSON directly).
- Configure your credentials (e.g. API keys, database URLs) in the corresponding node settings.
- Click Execute Workflow to test and switch to Active!
Related AI Agents Workflows
View All in AI Agents →5 ways to process images PDFs with Gemini AI in n8n
How it works Many users have asked in the support forum about different methods to analyze images and PDF documents with Google Gemini AI in n8n. This workfl...
7 AI Sales Assistant
Production-ready n8n automation template for 7 AI Sales Assistant built by AhiXLight. Seamlessly connects Airtop Tool, Slack, Airtop with 24 configured nodes.
AAVE portfolio professional AI agent Telegram Email GPT 4o
A next-generation AI-powered DeFi health monitor that tracks wallet positions across Aave V3 using GPT-4o and LangChain. It delivers human-readable reports v...
Access control for AI agents RBAC using Airtable and Telegram
Purpose This workflow allows granular control over the access to tools connected to AI Agents (including Multi-Agent setups) using Role Based Access Control....