Templates / Build a Google Drive internal knowledge base with OpenAI and Pinecone

Build a Google Drive internal knowledge base with OpenAI and Pinecone

Ready for 3.0

by Rahul Joshi βœ“ Β· 636 views Β· created 2026-03-09 Β· Internal Wiki, AI RAG

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

Nodes used (14)

Google SheetsGmailGoogle DrivePinecone Vector StoreDefault Data LoaderRecursive Character Text SplitterEmbeddings OpenAIOpenAI

What it does

πŸ“Š Description Every company has documents sitting in Google Drive that nobody reads. HR policies, sales playbooks, product FAQs, financial guidelines β€” all written once, never found again. This workflow turns all of those documents into a live, searchable AI knowledge base that any team member can query instantly via a simple API call. Ask it anything. It finds the right document, pulls the exact relevant section, and answers in plain english β€” with the source cited so you always know where the answer came from. No hallucinations, no guessing, no manual searching. Built for founders, ops teams, and automation agencies who want company knowledge to be instantly accessible without building a custom RAG system from scratch. What This Workflow Does πŸ“‚ Reads all Google Docs from your Knowledge Base folder in Google Drive automatically βœ‚οΈ Splits each document into semantic chunks with overlap for better context retrieval πŸ€– Converts every chunk into vector embeddings using OpenAI text-embedding-3-small πŸ“Œ Stores all embeddings in Pinecone with document metadata for fast semantic search 🌐 Accepts any question via webhook β€” from Slack, a form, or any internal tool πŸ” Searches Pinecone for the 5 most semantically relevant chunks to the question 🧠 Sends retrieved context to GPT-4o which answers using only what's in your documents πŸ“ Logs every question, answer, source, and confidence score to Google Sheets πŸ”„ Every Sunday checks Drive for new or updated documents and re-ingests them automatically πŸ“§ Sends a weekly knowledge base digest showing what's current, new, or updated Key Benefits βœ… Zero hallucinations β€” GPT-4o only answers from your actual documents βœ… Always cites the source document so answers are verifiable βœ… Semantic search finds relevant content even if exact words don't match βœ… Knowledge base stays fresh automatically every Sunday βœ… Every Q&A logged to Google Sheets for full audit trail βœ… Works with any Google Docs β€” just drop them in the folder and run SW1 How It Works The workflow runs across 3 sub-workflows β€” one for ingestion, one for answering, one for maintenance. SW1 β€” Document Ingestion Pipeline (Run manually) You point it at your Google Drive Knowledge Base folder. It downloads every Google Doc as plain text, splits each one into 500-character chunks with 100-character overlap so context is preserved across boundaries. Each chunk gets converted into a 1536-dimension vector embedding using OpenAI's text-embedding-3-small model and stored in Pinecone with the document name as metadata. Every ingested document is logged to your Document Registry sheet with the ingestion date. Run this once when setting up, then SW3 handles updates automatically. SW2 β€” Question & Answer Agent (Always active via webhook) Someone sends a POST request with a question and their email. The question gets converted to an embedding using the same model used during ingestion. Pinecone finds the 5 most semantically similar chunks β€” ranked by cosine similarity score. Chunks scoring below 0.3 are filtered out to avoid irrelevant results. The remaining context gets sent to GPT-4o with strict instructions to only answer from what's provided. If the answer isn't in the knowledge base, it says so clearly instead of making something up. The response includes the answer, source document, confidence level, and whether it was found in the knowledge base. Everything is logged to your Q&A Log sheet. SW3 β€” Knowledge Base Manager (Every Sunday 11AM) Pulls your current Drive folder contents and compares every document ID against your Document Registry. New documents get flagged for ingestion. Existing documents get checked β€” if the file was modified after the last ingestion date, it gets re-ingested automatically. You get a weekly digest email showing what's current, what was updated, and what's new. No manual monitoring needed. Features - Manual ingestion trigger for initial setup - Google Drive folder monitoring for new and updated docs - Recursive charac

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.