📥 Transform Google Drive documents into vector embeddings
Automatically convert documents from Google Drive into vector embeddings using OpenAI, LangChain, and PGVector — fully automated through n8n. --- ⚙️ What It Does This workflow monitors a Google Drive folder for new files, supports multiple file types (PDF, TXT, JSON), and processes them into vector embeddings using OpenAI’s text-embedding-3-small model. These embeddings are stored in a Postgres database using the PGVector extension, making them query-ready for semantic search or RAG-based AI age
At a glance
📥 Transform Google Drive documents into vector embeddings is a ready-made n8n workflow you import as a workflow JSON file — no build required. It connects OpenAI, Google Drive. It's free to download. Follow the 5-step import below to go live in minutes.
- Platform
- n8n
- Connects
- OpenAI, Google Drive
- Modules
- 14
- Price
- Free
- Version
- v1.0

About this workflow
Automatically convert documents from Google Drive into vector embeddings using OpenAI, LangChain, and PGVector — fully automated through n8n. --- ⚙️ What It Does This workflow monitors a Google Drive folder for new files, supports multiple file types (PDF, TXT, JSON), and processes them into vector embeddings using OpenAI’s text-embedding-3-small model. These embeddings are stored in a Postgres database using the PGVector extension, making them query-ready for semantic search or RAG-based AI agents. After successful processing, files are moved to a separate “vectorized” folder to avoid duplication. --- 💡 Use Cases - Powering Retrieval-Augmented Generation (RAG) AI agents - Semantic search across private documents - AI assistant knowledge ingestion - Automated document pipelines for indexing or classification --- 🧠 Workflow Highlights - Trigger Options: Manual or Scheduled (3 AM daily by default) - Supported File Types: PDF, TXT, JSON - Embedding Stack: LangChain Text Splitter, OpenAI Embeddings, PGVector - Deduplication: Files are moved after processing - License: CC BY-SA 4.0 - Author: AlexK1919 --- 🛠 What You’ll Need - Google Drive OAuth2 credentials (connected to Search Folder, Download File, and Move File nodes) - OpenAI API Key (used in the Embeddings OpenAI node) - Postgres + PGVector database (connected in the Postgres PGVector Store node) --- 🔧 Step-by-Step Setup Instructions 1. Create Google OAuth2 credentials in n8n and connect them to all Google Drive nodes. 2. Set your source folder ID in the Search Folder node — this is where incoming files are placed. 3. Set your processed folder ID in the Move File node — files will be moved here after vectorization. 4. Ensure you have a PGVector-enabled Postgres instance and input the table name and collection in the Postgres PGVector Store node. 5. Add your OpenAI credentials to the Embeddings OpenAI node and select text-embedding-3-small. 6. Optional: Activate the Schedule Trigger node to run daily or configure your own schedule. 7. Run manually by triggering When clicking ‘Test workflow’ for on-demand ingestion. --- 🧩 Customization Tips Want to support more file types or enhance the pipeline? - Add new extractors: Use Extract from File with other formats like DOCX, Markdown, or HTML. - Refine logic by file type: The Switch node routes files to the correct extraction method based on MIME type (application/pdf, text/plain, application/json). - Pre-process with OCR: Add an OCR step before extraction to handle scanned PDFs or images. - Add filters: Enhance the Search Folder or Switch node logic to skip specific files or folders. --- 📄 License This workflow is available under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) license. You are free to use, adapt, and share this workflow for non-commercial purposes under the terms of this license. Full license details:
How to import this n8n workflow
- 1
Download the workflow JSON file after purchase.
- 2
Open n8n → click the menu → Import from File.
- 3
Select the downloaded JSON and import.
- 4
Set up credentials for each node that requires them.
- 5
Click Execute Workflow to test, then activate.
Setup guide
Setup guide included
Purchase to unlock the full step-by-step guide
Related N8n workflows
Analyze sentiment in customer feedback on Google Sheets using ChatGPT
Monitor Microsoft email messages and create draft emails with ChatGPT
Automate assignment grading with GPT-4-Turbo and multi-format reports
Upload files from Google Drive to Docparser
Trigger new articles and add rows in Google Sheets with a ChatGPT Assistant
Summarize YouTube videos into structured content ideas with AI and Airtable
Automate B2B cold email outreach with Gemini, Gmail and Google Sheets
Automate full agreement lifecycle with JotForm, approvals, Signwell e-signatures & tracking
Reviews
No reviews yet
Be the first to buy and share your experience.
Leave a review
Sign in to share your experience with this workflow.
Create a free account to purchase workflows.
- JSON blueprint — instant download
- Setup guide PDF included
- 5 downloads · valid 30 days
- Works with n8n
Need help setting this up?
Book a 3-hour live setup session with an Agility consultant.
- Configure live on Google Meet / Zoom
- Free follow-up if workflow has defects
- Platform expert assigned to you