Curated by n8n Markets team
Last updated: June 2, 2026
Your Documents Should Answer Questions. Not Just Sit There. Your company has manuals, SOPs, contracts, product catalogs, and reports that no one can find when they need them. Someone asks a question, nobody knows where to look, and 30 minutes are lost. RAG Knowledge Base Pipeline solves this permanently. Drop a document in Google Drive — the system reads it, splits it into chunks, creates vector embeddings, and stores it in Supabase. Then anyone on your team can ask questions in Telegram and get accurate, sourced answers in seconds — from the exact content in your documents. This is Retrieval-Augmented Generation (RAG): the same technology enterprises use to build internal knowledge bases, packaged as a ready-to-import n8n workflow. PART 1 — Document Ingestion (automatic): 1. Google Drive Trigger — monitors a folder. New file uploaded → pipeline starts automatically. 2. Split into Chunks — 500-word overlapping chunks to preserve context. 3. OpenAI Embeddings — converts each chunk to a vector using text-embedding-3-small. 4. Supabase Storage — stores chunk + vector + metadata using pgvector. PART 2 — Question & Answer (real-time): 5. Telegram Trigger — user sends a question in plain language. 6. Embed the Question — same OpenAI model converts the question to a vector. 7. Semantic Search — queries Supabase match_documents to find the 5 most relevant chunks (cosine similarity >= 0.78). 8. GPT-4o Answer — answers ONLY from the retrieved context. No hallucinations, no made-up facts. 9. Telegram Reply — sends the answer with source file names. Response time: under 5 seconds. Use Cases: Internal SOPs and HR policy Q&A. Product catalog search. Legal contract lookup. Customer support knowledge base. Real estate listing search. Medical protocol assistant.
- n8n Cloud or self-hosted (v1.0+) - Supabase account (free tier works for up to ~50,000 chunks) - OpenAI API key (GPT-4o-mini + embeddings, ~$0.01-0.05 per 100 pages ingested) - Telegram bot (free, 2-minute setup via @BotFather) - Google Drive (for automatic ingestion trigger)
1. In Supabase, run the SQL setup script to create the documents table with pgvector and the match_documents function. 2. Import the workflow JSON in n8n (File → Import). 3. Set n8n variables: OPENAI_API_KEY, SUPABASE_URL, SUPABASE_ANON_KEY, GDRIVE_FOLDER_ID. 4. Connect credentials: Google Drive OAuth2, Telegram Bot API. 5. Activate the workflow. Upload a PDF to your Google Drive folder — the pipeline ingests it automatically. Then send a question to your Telegram bot and get an accurate answer from your documents. Total setup time: ~20 minutes.
Included in Builder Pro — $19/mo, 4,177 premium workflows
Templates are reviewed before they are listed. Test with your own credentials and data before running it in production.
100% Secure Checkout
Refund requests within 7 days of a new subscription
⚠️ 2 services require credentials. Make sure you have accounts set up before importing.
0 reviews
No reviews yet.
Log in to ask a question.
No questions yet. Be the first to ask!