Use this robust n8n workflow to automatically process and ingest multi-format documents (PDF, Docx, Excel) from Google Drive into a Supabase Vectorstore using OpenAI embeddings, perfect for building custom RAG chatbots.
Download this n8n workflow template and start using it instantly.
AI Developers and Engineers needing to populate a vector database automatically.
Data specialists who handle diverse document types (Word, Excel, PDF).
Users looking for a production-ready n8n workflow to create a dynamic RAG knowledge base.
Anyone building custom chatbots powered by proprietary company data.
Building a reliable Retrieval-Augmented Generation (RAG) system requires clean, chunked, and vectorized data. This advanced n8n workflow solves the complex challenge of ingesting diverse file types directly from a monitored Google Drive folder.
Traditional systems struggle with proprietary formats like MS Word or complex layouts like Excel spreadsheets. This specific n8n template ensures robust handling: converting Word documents to plain text Google Docs, extracting data from PDFs, and summarizing Excel content before vectorization.
By leveraging the Google Drive Trigger n8n node, this automation acts as a continuous ingestion pipeline, generating high-quality text chunks using the Recursive Character Text Splitter and powerful embeddings via the OpenAI Embeddings n8n node. The final output is seamlessly inserted into Supabase, maintaining critical file metadata required for advanced RAG queries.
This n8n workflow initiates every time a new file is uploaded to a specified Google Drive folder.
File Created n8n trigger node immediately captures details of any new file upload.Set File ID1). The Loop Over Items n8n node ensures batch processing compatibility.Switch2 n8n node routes the data based on the MIME type:Convert to Google Doc1 (using a Google Drive API call) which converts the file to a native Google Doc for reliable text extraction, followed by deleting the original file using the Delete File n8n node.Extract PDF Text n8n node.Extract from Excel n8n node, and the resulting tabular data is aggregated and summarized into a continuous text stream using the Aggregate1 and Summarize1 n8n node steps.Extract from Text File or Download File1.Enhanced Default Data Loader1 n8n node enriches the raw text with vital metadata, including file name, creator, and ID.Recursive Character Text Splitter n8n node breaks the large document text into smaller, manageable chunks (2000 characters with 200 overlap), optimized for vector searches.Embeddings OpenAI1 n8n node calls the OpenAI API to generate dense vector representations for each text chunk.Insert into Supabase Vectorstore1 n8n node securely stores the text chunks, metadata, and generated embeddings into the Supabase RAG table, completing the robust n8n workflow cycle.To deploy this comprehensive n8n template, follow these steps:
File Created n8n trigger and subsequent file operations (Download, Convert, Delete).Embeddings OpenAI1 n8n node for vector generation.Insert into Supabase Vectorstore1 n8n node to connect to your vector database.File Created n8n trigger node is set to watch the correct folder ID where documents will be uploaded. The current n8n workflow is configured to watch a folder named 'DOCUMENTS'.documents in this configuration) with appropriate schema and indexing for vector storage. File Created (Google Drive Trigger n8n trigger node): Starts the entire n8n workflow upon detecting a new file in a specific Google Drive folder. Crucial for real-time RAG ingestion.
Switch2 (n8n node): Acts as a router, checking the file's MIME type. It branches the flow based on whether the file is a PDF, a native Google Doc, an Excel sheet, or a convertible Word document.
Convert to Google Doc1 (HTTP Request n8n node): Specifically handles MS Word document types. It uses the Google Drive API to create a copy of the file, forcing conversion into a Google Document format, which simplifies subsequent text extraction.
Extract PDF Text / Extract from Text File / Extract from Excel (n8n nodes): These nodes perform the actual heavy lifting of parsing different file formats into usable text data.
Recursive Character Text Splitter (n8n node): A critical step in the RAG pipeline. It splits the extracted document content into uniform, overlapping chunks (2000 characters size, 200 overlap), maximizing context preservation for the vector database.
Embeddings OpenAI1 (n8n node): Generates numerical vector representations (embeddings) of the text chunks using the OpenAI model, making the text searchable by semantic similarity.
Implement a powerful multi-engine search toolset for your AI agent using this n8n workflow template. Integrates 20+ specialized SerpApi search functions via an n8n MCP server.

Deploy a robust, multi-department support bot with this advanced n8n workflow. Integrates Telegram, PostgreSQL for sessions, Google Drive, Pinecone RAG, and AI agents.

Centralize error management for your automations. This robust n8n workflow captures failures using the specialized n8n trigger and routes detailed alerts to Telegram, Gmail, and other channels. Download this n8n templates for reliable monitoring.

Use this powerful n8n workflow to automatically monitor multi-jurisdiction regulatory changes (EU, US, UK), compare them against active contracts via a Postgres database, calculate risk scores using a custom n8n node, and send critical alerts via Gmail. This is one of the essential n8n templates for legal tech.

Deploy a dynamic multi-LLM customer support chatbot using this versatile n8n workflow. Integrate with WordPress or any live chat via webhook to automate service and lead generation. Find powerful n8n templates here.









































