RAG Knowledge Base — Docs to Telegram Q&A (n8n + Supabase + GPT-4)
    100%
    Data Processing
    0(0 reviews)
    0 downloads

    RAG Knowledge Base — Docs to Telegram Q&A (n8n + Supabase + GPT-4)

    NM

    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.

    What's Included

    • Complete n8n workflow JSON (11 nodes, import in 30 seconds)
    • Supabase SQL setup script (documents table + pgvector extension + match_documents function)
    • Step-by-step setup guide (5 steps, ~20 minutes total)
    • Works with any text documents: PDFs, TXT, Markdown, Google Docs exports
    • Webhook endpoint for manual document ingestion (bypass Drive trigger if needed)

    Requirements

    - 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)

    How to Use

    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.

    How to import this template into n8n

    1. Download the workflow JSON file from this page.
    2. In n8n, open Workflows, create a new workflow and choose Import from File.
    3. Open each node that shows a warning and connect your own credentials.
    4. Run the workflow once manually to check the output before you activate it.
    Included in Pro
    • Importable n8n workflow JSON file
    • Download with Builder Pro or Agency Unlimited
    • Built for n8n v1.0++
    • Setup time: 30 minutes

    Included in Builder Pro — $19/mo, 4,177 premium workflows

    Before you activate

    Templates are reviewed before they are listed. Test with your own credentials and data before running it in production.

    Updated Jun 2026
    v1.0.0
    SSL
    Secure
    GDPR

    100% Secure Checkout

    Refund requests within 7 days of a new subscription

    Dependencies & Requirements

    OpenAI
    AI
    Google Drive
    Storage

    ⚠️ 2 services require credentials. Make sure you have accounts set up before importing.

    Reviews

    0

    No reviews yet

    See all 0 reviews ↓
    —

    0 reviews

    5★
    0
    4★
    0
    3★
    0
    2★
    0
    1★
    0

    No reviews yet.

    Questions & Answers

    0

    Log in to ask a question.

    No questions yet. Be the first to ask!

    People Also Bought