Build a dual-stage RAG chat assistant with Google Drive, Ollama, Pinecone and Gemini
Ready for 3.0What this workflow does
This AI workflow has 27 nodes and runs manually, when you click “Execute workflow” (plus 2 other triggers). Along the way it connects Google Drive, Pinecone Vector Store, Embeddings Ollama and Google Gemini Chat Model and 1 more.
How it runs
Trigger: Manually, when you click “Execute workflow” (plus 2 other triggers).
- Search Drive Files (Google Drive): work with file folder
- Lookup in Semantic Cache (Pinecone Vector Store): searches the Pinecone vector store, with embeddings: Cache Query with Ollama
- Download Drive File (Google Drive): download
- Evaluate JavaScript Cache (Code): runs custom JavaScript code
- Check If PDF (If): checks a condition and branches into true / false
- Check Cache Hit (If): checks a condition and branches into true / false
- Extract PDF Content (Extract from File): extracts data from a file (pdf)
- Extract Text Content (Extract from File): extracts data from a file (text)
- Set Cached Answer (Edit Fields (Set)): sets 1 field: output
- AI Query Response Agent (AI Agent): runs an AI agent, with model: Google Chat Model for Agent; 1 tool (Vector Store Question Answering); memory: Manage Simple Memory
…plus 3 more steps. See the full node list below.
Services it uses
Other Google Gemini + Google Drive templates (272) · Other Google Drive + Pinecone templates (65) · Other Google Gemini + Pinecone templates (45)
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (16)
- Manual Trigger
n8n-nodes-base.manualTrigger - Google Drive Trigger
n8n-nodes-base.googleDriveTrigger - Google Drive
n8n-nodes-base.googleDrive - If
n8n-nodes-base.if - Extract from File
n8n-nodes-base.extractFromFile - Merge
n8n-nodes-base.merge - Pinecone Vector Store
@n8n/n8n-nodes-langchain.vectorStorePinecone - Embeddings Ollama
@n8n/n8n-nodes-langchain.embeddingsOllama - Default Data Loader
@n8n/n8n-nodes-langchain.documentDefaultDataLoader - Chat Trigger
@n8n/n8n-nodes-langchain.chatTrigger - Code
n8n-nodes-base.code - Edit Fields (Set)
n8n-nodes-base.set - AI Agent
@n8n/n8n-nodes-langchain.agent - Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow - Vector Store Question Answer Tool
@n8n/n8n-nodes-langchain.toolVectorStore
From the author
Quick overview This template builds a dual-stage RAG system that ingests PDFs/text from Google Drive into a Pinecone knowledge-base index with Ollama embeddings, and serves chat queries via a Pinecone semantic cache that falls back to a Google Gemini AI Agent…