← All N8N workflows
AI & researchAgentCodeDocument Default Data LoaderEmbeddings Google GeminiExtract From File

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.

Workflow preview
TriggerWhen clicking ‘Testworkflow’Manual TriggerRoutingLoop Over ItemsLoop Over ItemsAI & modelsOpenRouter Chat ModelLM Chat Open RouterData storePinecone Vector StoreVector Store PineconeAI & modelsEmbeddings GoogleGeminiEmbeddings Google GeminiFiles / mediaDefault Data LoaderDocument Default Data Lo…TransformRecursive CharacterText SplitterText Splitter Recursive …Files / mediaGet Document FromGoogle DriveGoogle DriveTransformExtract Text Data FromGoogle DocumentExtract From FileCodeSplit Document TextInto SectionsCodeTransformPrepare Sections ForLoopingSplit OutAI & modelsAI Agent - PrepareContextAgentTransformConcatenate the contextand section textEdit Fields

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.

Workflow node names, types, and operations
NodeCategoryTypeOperation
When clicking ‘Test workflow’TriggerManual TriggerSee node parameters
Loop Over ItemsRoutingLoop Over ItemsSee node parameters
OpenRouter Chat ModelAI & modelsLM Chat Open RouterSee node parameters
Pinecone Vector StoreData storeVector Store PineconeSee node parameters
Embeddings Google GeminiAI & modelsEmbeddings Google GeminiSee node parameters
Default Data LoaderFiles / mediaDocument Default Data LoaderSee node parameters
Recursive Character Text SplitterTransformText Splitter Recursive Character Text SplitterSee node parameters
Get Document From Google DriveFiles / mediaGoogle Drivedownload
Extract Text Data From Google DocumentTransformExtract From Filetext
Split Document Text Into SectionsCodeCodeSee node parameters
Prepare Sections For LoopingTransformSplit OutSee node parameters
AI Agent - Prepare ContextAI & modelsAgentSee node parameters
Concatenate the context and section textTransformEdit FieldsSee node parameters

Setup

  1. Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
  2. Connect your own credentials through n8n’s credential store. Replace REPLACE_WITH_* values with your resource identifiers.
  3. Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
  4. 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

  • googleDriveOAuth2Api
  • googlePalmApi
  • openRouterApi
  • pineconeApi

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.

Video Demo

Video Demo

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.

More in AI & research