RAG:Context-Aware Chunking \| Google Drive to Pinecone via OpenRouter & Gemini
Configured with Agent, Document Default Data Loader, Embeddings Google Gemini, Extract From File, and additional nodes. Review the connections and setup before adapting this template.
Node categories in this workflow
- Trigger
- Routing
- AI & models
- Data store
- Files / media
- Transform
- Code
Icons describe general node roles, inferred from node types. Inspect the parameters for the configured action.
Drag to pan; use + and − to zoom. Reconstructed from the exported node positions; nothing runs here. Dashed lines represent non-main connections. Full node names and notes appear below.
How it works
The exported workflow contains the following configured nodes. Their connections are shown above; inspect the JSON for the complete logic, expressions, and external actions.
| Node | Category | Type | Operation |
|---|---|---|---|
| When clicking ‘Test workflow’ | Trigger | Manual Trigger | See node parameters |
| Loop Over Items | Routing | Loop Over Items | See node parameters |
| OpenRouter Chat Model | AI & models | LM Chat Open Router | See node parameters |
| Pinecone Vector Store | Data store | Vector Store Pinecone | See node parameters |
| Embeddings Google Gemini | AI & models | Embeddings Google Gemini | See node parameters |
| Default Data Loader | Files / media | Document Default Data Loader | See node parameters |
| Recursive Character Text Splitter | Transform | Text Splitter Recursive Character Text Splitter | See node parameters |
| Get Document From Google Drive | Files / media | Google Drive | download |
| Extract Text Data From Google Document | Transform | Extract From File | text |
| Split Document Text Into Sections | Code | Code | See node parameters |
| Prepare Sections For Looping | Transform | Split Out | See node parameters |
| AI Agent - Prepare Context | AI & models | Agent | See node parameters |
| Concatenate the context and section text | Transform | Edit Fields | See node parameters |
Setup
- Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
- Connect your own credentials through n8n’s credential store. Replace
REPLACE_WITH_*values with your resource identifiers. - Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
- Run with synthetic data and harmless destinations. Enable triggers only after checking the actual outputs.
Requirements
An n8n instance with the listed node types and compatible versions. Service-connected workflows may require accounts, credentials, or paid APIs.
Credential types declared in the source
googleDriveOAuth2ApigooglePalmApiopenRouterApipineconeApi
Workflow notes
Prepare Document.
Prepare Document.
This section is responsible for downloading the file from Google Drive, splitting the text into sections by detecting separators, and preparing them for looping.
Prepare context
Prepare context
In this section, the agent node will prepare context for a section (chunk of text), which will then be passed for conversion into a vectors along with the section itself.
Convert Text To Vectors
Convert Text To Vectors
In this step, the Pinecone node converts the provided text into vectors using Google Gemini and stores them in the Pinecone vector database.
RAG:Context-Aware Chunking \| Google Drive to Pinecone via OpenRouter & Gemini
RAG:Context-Aware Chunking | Google Drive to Pinecone via OpenRouter & Gemini
Purpose and structure
This folder contains the RAG:Context-Aware Chunking | Google Drive to Pinecone via OpenRouter & Gemini workflow. Its executable nodes use agent, code, documentDefaultDataLoader, embeddingsGoogleGemini, extractFromFile, googleDrive, lmChatOpenRouter, manualTrigger, set, splitInBatches, splitOut, textSplitterRecursiveCharacterTextSplitter, vectorStorePinecone. The table and connection map below are derived from the JSON, not an inferred guarantee of behavior.
Setup
Import inactive. Configure your own credentials and replace REPLACE_WITH_* values. Review external destinations and Code nodes before running.
Entry points
When clicking ‘Test workflow’
Verification
Sanitized source candidate; not runtime-tested. This overview is generated from node metadata. Read the folder README for the connection map, credential types, and license.
Attribution
https://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/workflows/Splitout/1627_Splitout_Code_Automation_Triggered.json MIT; preserve source notices.