Templates / Company knowledge base agent (RAG)

Company knowledge base agent (RAG)

Needs changes

by Abdul Mir ✓ · 20,677 views · created 2025-07-27 · Internal Wiki, AI RAG

Needs changes. This template uses 1 thing(s) that n8n 3.0 removes: AI Agent v1 (old agent modes). 1 breaking item(s) found. Static check, last run 2026-10-19.

What to replace before upgrading

Removed in 3.0Replace with
AI Agent v1 (old agent modes)
RAG Agent (v1.7)
Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.

Nodes used (18)

Supabase Vector StoreDefault Data LoaderRecursive Character Text SplitterEmbeddings OpenAIGoogle DriveSupabaseOpenAITelegramAI AgentSimple MemoryOpenAI Chat ModelVector Store Question Answer

What it does

Overview Turn your docs into an AI-powered internal or public-facing assistant. This chatbot workflow uses RAG (Retrieval-Augmented Generation) with Supabase vector search to answer employee or customer questions based on your company documents—automatically updated via Google Drive. Whether it’s deployed in Telegram or embedded on your website, this agent supports voice and text input, transcribes voice messages, pulls relevant context from your internal files, and responds with a helpful, AI-generated answer. Two additional workflows listen for file changes in a shared Google Drive folder, convert them into embeddings using OpenAI, and sync them with your Supabase vector DB—so your knowledge base is always up to date. Who’s it for - Startups building an internal ops or HR assistant - SaaS companies deploying help bots on their websites - Customer support teams reducing repetitive questions - Knowledge-driven teams needing internal AI assistants How it works - Triggered via Telegram bot (or easily swapped for website chatbot or “on chat message”) - If user sends a voice message, it’s transcribed to text using OpenAI Whisper - Input is passed to a RAG agent that: - Searches a Supabase vector store for relevant docs - Pulls context from matching chunks using OpenAI embeddings - Responds with an LLM-powered answer - The response is sent back as a Telegram message - Two separate workflows: - New File Workflow: Listens for file uploads in Google Drive, extracts and splits text, then sends to Supabase with embeddings - Update File Workflow: Detects file edits, deletes old rows, and updates embeddings for the revised file Example use case > You upload your internal policy docs and client FAQs into a Google Drive folder. > > Employees or customers can now ask: > - “What’s the refund policy for annual plans?” > - “How do I request a day off?” > - “What tools are approved for use by the engineering team?” > > The chatbot instantly pulls up the right section and responds with a smart, confident answer. How to set up 1. Connect a Telegram bot or use n8n’s webchat / chatbot widget 2. Hook up OpenAI for transcription, embeddings, and completion 3. Set up a Supabase project and connect it as a vector store 4. Upload your internal docs to Google Drive 5. Deploy the “Add File” and “Update File” automations to manage embedding sync 6. Customize the chatbot’s tone and personality with prompt tweaks Requirements - Telegram bot (or n8n Chat widget) - Google Drive integration - Supabase with pgvector or similar enabled - OpenAI API key (Whisper, Embeddings, ChatGPT) - Two folders: one for raw documents and one for tracking updates How to customize - Swap Supabase for Pinecone, Weaviate, or Qdrant - Replace Telegram with web chat, Slack, Intercom, or Discord - Add logic to handle fallback answers or escalate to human - Embed the chat widget on your site for public customer use - Add filters (e.g. department, date, author) to narrow down context

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.