Load Google Drive Documents into Vector Database
Workflow Description
Automation that retrieves files from Google Drive, splits them into manageable text chunks, converts them to embeddings using OpenAI, and stores them in PostgreSQL for semantic search capabilities without requiring manual intervention.
How it works
- 1.Retrieve documents from specified Google Drive folder
- 2.Split content into optimized text segments using recursive character splitting
- 3.Generate vector embeddings via OpenAI API for each segment
- 4.Batch insert embeddings into PostgreSQL vector store
Use cases
- Create semantic search engine for enterprise document repository
- Build intelligent information retrieval system for uploaded files
Requirements
- Connected Google Drive account with document access
- OpenAI API key for embedding generation
- PostgreSQL database with vector extension enabled
Service Value
Ideal as a smart automation service combining integrations and AI to produce ready-to-use results.
Apps Used
Details
How to Use
- 1.Click "Download Template"
- 2.Open your n8n dashboard
- 3.Go to Workflows > Import from File
- 4.Select downloaded file and configure credentials
Nodes Used (15)
Default Data Loader
Document Default Data Loader
Recursive Character Text Splitter
Text Splitter Recursive Character Text Splitter
Embeddings OpenAI
OpenAI
Postgres PGVector Store
Vector Store P G Vector
When clicking ‘Test workflow’
Manual Trigger
Loop Over Items
Split In Batches
Move File
Google Drive
Download File
Google Drive
Search Folder
Google Drive
Schedule Trigger
Schedule Trigger
Sticky Note
Sticky Note
Switch
Switch
Extract from PDF
Extract From File
Extract from Text
Extract From File
Extract from JSON
Extract From File