Build an intelligent 24/7 Telegram customer support bot using an n8n workflow, OpenAI (GPT-4o-mini), and a Google Docs knowledge base for instant Retrieval-Augmented Generation (RAG) responses.
Download this n8n workflow template and start using it instantly.
Managing customer support across multiple channels can be resource-intensive. This robust n8n workflow solves that problem by turning a Telegram bot into a sophisticated AI customer support agent. Unlike basic chatbots, this agent utilizes Retrieval-Augmented Generation (RAG) by referencing a dedicated Google Doc, ensuring all responses are accurate and grounded in your business documentation.
This specific n8n workflow utilizes the powerful Langchain integration, combining the reasoning ability of the gpt-4o-mini model with context retention (Simple Memory) and external knowledge (Google Docs). By using this n8n template, businesses can guarantee consistent, friendly, and immediate support 24 hours a day without writing a single line of code. Every n8n node is configured to maximize efficiency, delivering fast responses directly back to the user via Telegram.
The entire process is streamlined through a sequence of interconnected n8n nodes, beginning the moment a user sends a message to your Telegram bot.
$json.output) is immediately sent back to the user's chat session using the final Telegram n8n node.To deploy this expert n8n workflow, follow these setup steps:
This advanced n8n workflow utilizes several specialized n8n nodes:
Telegram Trigger: This n8n trigger starts the execution flow upon receiving any new message on the configured Telegram bot. Key configuration is listening specifically for updates: [message].
Customer Support AI Agent (Langchain Agent): The central orchestration n8n node. It manages the conversation, decides whether to use the tools (Google Docs) or memory, and sends the prompt to the LLM. The crucial configuration is the detailed System Message defining the agent's role and RAG instructions.
OpenAI Chat Model: Configured to use gpt-4o-mini, providing high-quality, cost-effective language generation capabilities to the agent.
Simple Memory (Buffer Window): A crucial Langchain n8n node that maintains conversational history using the Telegram chat ID as the sessionKey. This allows the AI agent to remember context across multiple messages.
Google Docs Tool: This RAG n8n node fetches the content of the specified Google Doc URL. It serves as the business's knowledge base, which the AI Agent cross-references to generate accurate responses.
Telegram: The final action n8n node, responsible for sending the AI-generated response ($json.output) back to the originating user's chat ID.
Instantly deploy a secure Speech-to-Text API using this powerful n8n workflow. It uses the OpenAI GPT-4o-mini model for fast transcription, perfect for custom applications or internal tools.

Build a powerful custom AI Agent using this n8n workflow. Integrate OpenAI, contextual chat history (memory), and an Airtable knowledge base for accurate, data-driven responses.

Create a powerful, scalable Slack chatbot using this robust n8n workflow. Integrate GPT-4o for real-time customer support responses and automated AI interactions.

Use this comprehensive n8n workflow to create a scalable customer support bridge between WhatsApp and Telegram. Automatically manage conversation threads using Supabase and dedicated Telegram forum topics.

Automating Start-Up and Business processes. Helping non-techies understand and leverage Agentic AI with easy to understand step-by-step tutorials. Check out my educational content: https://www.youtube.com/@Automatewithmarc







































