RAG: Context-Aware Slicing | Google Drive to Pinecone via Gemini
Workflow Description
This automation retrieves documents from Google Drive and intelligently chunks them using Gemini, then converts them to vector embeddings and loads them into Pinecone for an advanced context-aware retrieval system.
How it works
- 1.Trigger the workflow manually to initiate document retrieval from Google Drive
- 2.Load and process documents using the Document Data Loader with Gemini-powered analysis
- 3.Intelligently split text using recursive character splitting while preserving semantic context
- 4.Convert chunked text to vector embeddings through Gemini embeddings integration
- 5.Batch process and store vectors in Pinecone for scalable semantic search capability
Use cases
- Build semantic search engines that understand meaning beyond keyword matching
- Create intelligent document Q&A systems for enterprise knowledge bases
- Develop AI assistants that retrieve accurate contextual information from large document collections
Requirements
- Active Google account with authorized Google Drive access
- Pinecone API key with configured index environment
- OpenRouter API credentials for Gemini model access
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