Document RAG & chat agent: Google Drive to Qdrant with Mistral OCR
Needs changesWhat this workflow does
This AI workflow has 25 nodes and runs when a chat message arrives (plus 1 other trigger). Along the way it connects Embeddings OpenAI, OpenAI Chat Model, HTTP Request and Qdrant Vector Store and 2 more. It also calls api.mistral.ai and api.tavily.com over HTTP.
How it runs
Trigger: When a chat message arrives (plus 1 other trigger).
- ai chat agent (AI Agent): runs an AI agent, with model: OpenAI Chat Model; 2 tools (Web Search, Qdrant Vector Store); memory: Simple Memory
- Google Drive: work with file folder
- Loop Over each file in gdrive folder (Loop Over Items (Split in Batches)): loops over the items in batches
- add metadata (Edit Fields (Set)): sets 5 fields: file_id, file_type, file_title…
- Google Drive: download
- Mistral Upload (HTTP Request): calls api.mistral.ai (POST)
- Mistral Signed URL (HTTP Request): calls an HTTP API
- Mistral DOC OCR (HTTP Request): calls api.mistral.ai (POST)
- If: checks a condition and branches into true / false
- based file name it assign differ metadata (Information Extractor): extracts structured fields from text with AI, with model: Mistral Cloud Chat Model
…plus 4 more steps. See the full node list below.
Services it uses
HTTP calls to: api.mistral.ai, api.tavily.com
Before you upgrade to n8n 3.0
2 things in this workflow are removed in n8n 3.0. Fix them before you upgrade:
- HTTP Request Tool (legacy) in Web Search : replace with HTTP Request node connected to the AI Agent's Tool input.
- AI Agent v1 (old agent modes) in ai chat agent (v1.7): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
| Removed in 3.0 | Replace with |
|---|---|
| HTTP Request Tool (legacy) Web Search | HTTP Request node connected to the AI Agent's Tool input |
| AI Agent v1 (old agent modes) ai chat agent (v1.7) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
Nodes used (18)
- Embeddings OpenAI
@n8n/n8n-nodes-langchain.embeddingsOpenAi - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - HTTP Request Tool
@n8n/n8n-nodes-langchain.toolHttpRequest - Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow - Qdrant Vector Store
@n8n/n8n-nodes-langchain.vectorStoreQdrant - Chat Trigger
@n8n/n8n-nodes-langchain.chatTrigger - Default Data Loader
@n8n/n8n-nodes-langchain.documentDefaultDataLoader - Character Text Splitter
@n8n/n8n-nodes-langchain.textSplitterCharacterTextSplitter - Google Drive
n8n-nodes-base.googleDrive - HTTP Request
n8n-nodes-base.httpRequest - Manual Trigger
n8n-nodes-base.manualTrigger - Mistral Cloud Chat Model
@n8n/n8n-nodes-langchain.lmChatMistralCloud - AI Agent
@n8n/n8n-nodes-langchain.agent - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - Edit Fields (Set)
n8n-nodes-base.set - If
n8n-nodes-base.if - Information Extractor
@n8n/n8n-nodes-langchain.informationExtractor - Code
n8n-nodes-base.code
From the author
Knowledge RAG & AI Chat Agent: Google Drive to Qdrant Description This workflow transforms a Google Drive folder into an intelligent, searchable knowledge base and provides a chat agent to query it. It’s composed of two distinct flows: - An ingestion pipeline…