RAG: Context-Aware Slicing | Google Drive to Pinecone via Gemini
Workflow Description
Advanced automation template that extracts documents from Google Drive, intelligently chunks them into contextual segments, converts them to embeddings using Gemini, and stores them in Pinecone for efficient semantic search and retrieval.
How it works
- 1.Trigger workflow manually and retrieve documents from Google Drive
- 2.Load documents with default processor and split into segments using recursive character algorithm
- 3.Generate embedding vectors for document chunks using Gemini model
- 4.Process batches of chunks through intelligent agent workflow
- 5.Send vectors with metadata to Pinecone index for storage and indexing
Use cases
- Build semantic search systems that understand long document context and relationships
- Automate processing of large enterprise document collections before intelligent analysis
- Create flexible knowledge bases queryable through natural language interfaces
Requirements
- Active Google Drive account with documents ready for processing and extraction
- Valid Pinecone API credentials with configured index for vector storage
- Gemini API access and Open Router account for distributed API calls
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 (17)
When clicking ‘Test workflow’
Manual Trigger
Loop Over Items
Split In Batches
OpenRouter Chat Model
Lm Chat Open Router
Pinecone Vector Store
Vector Store Pinecone
Embeddings Google Gemini
Gemini Model
Default Data Loader
Document Default Data Loader
Recursive Character Text Splitter
Text Splitter Recursive Character Text Splitter
Get Document From Google Drive
Google Drive
Extract Text Data From Google Document
Extract From File
Split Document Text Into Sections
Code
Prepare Sections For Looping
Split Out
Sticky Note
Sticky Note
Sticky Note1
Sticky Note
AI Agent - Prepare Context
Agent
Concatenate the context and section text
Set
Sticky Note2
Sticky Note
Sticky Note3
Sticky Note