Build a PDF Document RAG System with Mistral OCR, Qdrant and Gemini AI
Ready for 3.0What this workflow does
This AI workflow has 29 nodes and runs manually, when you click “Execute workflow” (plus 2 other triggers). Along the way it connects Embeddings OpenAI, Google Gemini Chat Model, Qdrant Vector Store and Google Drive. It also calls api.mistral.ai and qdranturl over HTTP.
How it runs
Trigger: Manually, when you click “Execute workflow” (plus 2 other triggers).
- Refresh collection (HTTP Request): calls an HTTP API (POST)
- Get PDF (Google Drive): download
- Question and Answer Chain: answers questions over your documents (RAG), with model: Google Gemini Chat Model; retriever: Vector Store Retriever
- Search PDFs (Google Drive): work with file folder
- Mistral Upload (HTTP Request): calls api.mistral.ai (POST)
- Loop Over Items (Loop Over Items (Split in Batches)): loops over the items in batches
- Mistral Signed URL (HTTP Request): calls an HTTP API
- Edit Fields (Edit Fields (Set)): sets 1 field: file_id
- Mistral DOC OCR (HTTP Request): calls api.mistral.ai (POST)
- Execute Workflow (Execute Sub-workflow): calls another n8n workflow
…plus 8 more steps. See the full node list below.
Services it uses
HTTP calls to: api.mistral.ai, qdranturl
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 (18)
- HTTP Request
n8n-nodes-base.httpRequest - Manual Trigger
n8n-nodes-base.manualTrigger - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - Embeddings OpenAI
@n8n/n8n-nodes-langchain.embeddingsOpenAi - Default Data Loader
@n8n/n8n-nodes-langchain.documentDefaultDataLoader - Token Splitter
@n8n/n8n-nodes-langchain.textSplitterTokenSplitter - Chat Trigger
@n8n/n8n-nodes-langchain.chatTrigger - Question and Answer Chain
@n8n/n8n-nodes-langchain.chainRetrievalQa - Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - Vector Store Retriever
@n8n/n8n-nodes-langchain.retrieverVectorStore - Qdrant Vector Store
@n8n/n8n-nodes-langchain.vectorStoreQdrant - Code
n8n-nodes-base.code - Wait
n8n-nodes-base.wait - Execute Sub-workflow
n8n-nodes-base.executeWorkflow - Execute Workflow Trigger
n8n-nodes-base.executeWorkflowTrigger - Edit Fields (Set)
n8n-nodes-base.set - Summarization Chain
@n8n/n8n-nodes-langchain.chainSummarization - Google Drive
n8n-nodes-base.googleDrive
From the author
This workflow is designed to process PDF documents using Mistral's OCR capabilities, store the extracted text in a Qdrant vector database, and enable Retrieval-Augmented Generation (RAG) for answering questions. Here’s how it functions: Once configured, the…