Build a PDF Document RAG System with Mistral OCR, Qdrant and Gemini AI
    100%
    Automation
    0(0 reviews)
    2027 downloads

    Build a PDF Document RAG System with Mistral OCR, Qdrant and Gemini AI

    NM

    Curated by n8n Markets team

    Last updated: March 8, 2026

    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 workflow automates document ingestion, vectorization, and intelligent querying, enabling powerful RAG applications. Benefits End-to-End Automation No manual interaction is needed: documents are read, processed, and made queryable with minimal setup. Scalable and Modular The workflow uses subflows and batching, making it easy to scale and customize. Multi-Model Support Combines Mistral for OCR, OpenAI for embeddings, and Gemini for intelligent answering—taking advantage of the strengths of each. Real-Time Q\&A With RAG integration, users can query document content through natural language and receive accurate responses grounded in the PDF data. Light or Full Mode Users can choose to index full page content or only summarized text, optimizing for either performance or richness. How It Works PDF Processing with Mistral OCR: The workflow starts by uploading a PDF file to Mistral's API, which performs OCR to extract text and metadata. The extracted content is split into manageable chunks (e.g., pages or sections) for further processing. Vector Storage in Qdrant: The extracted text is converted into embeddings using OpenAI's embedding model. These embeddings are stored in a Qdrant vector database, enabling efficient similarity searches for RAG. Question-Answering with RAG: When a user submits a question via a chat interface, the workflow retrieves relevant text chunks from Qdrant using vector similarity. A language model (Google Gemini) generates answers based on the retrieved context, providing accurate and context-aware responses. Optional Summarization: The workflow includes an optional summarization step using Google Gemini to condense the extracted text for faster processing or lighter RAG usage. Set Up Steps To deploy this workflow in n8n, follow these steps: Configure Qdrant Database: Replace QDRANTURL and COLLECTION in the "Create collection" and "Refresh collection" nodes with your Qdrant instance details. Ensure the Qdrant collection is configured with the correct vector size (e.g., 1536 for OpenAI embeddings) and distance metric (e.g., Cosine). Set Up Credentials: Add credentials for: Mistral Cloud API (for OCR processing). OpenAI API (for embeddings). Google Gemini API (for chat and summarization). Google Drive (if sourcing PDFs from Drive). Qdrant API (for vector storage). PDF Source Configuration: If using Google Drive, specify the folder ID in the "Search PDFs" node. Alternatively, modify the workflow to accept PDFs from other sources (e.g., direct uploads or external APIs). Customize Text Processing: Adjust chunk size and overlap in the "Token Splitter" node to optimize for your document type. Choose between raw text or summarized content for RAG by toggling between the "Set page" and "Summarization Chain" nodes. Test the RAG: Trigger the workflow manually or via a chat message to verify OCR, embedding, and Qdrant storage. Use the "Question and Answer Chain" node to test query responses. Optional Sub-Workflows: The workflow supports execution as a sub-workflow for batch processing (e.g., handling multiple PDFs). Need help customizing? Contact me for consulting and support or add me on Linkedin.

    What's Included

    • Complete n8n workflow template with 0 nodes. Ready to import and customize.

    Requirements

    n8n instance (self-hosted or cloud). credentials.

    How to Use

    1. Download the workflow JSON 2. Import into your n8n instance 3. Configure credentials for 4. Activate and enjoy automation

    Apps in this n8n workflow

    How to import this template into n8n

    1. Download the workflow JSON file from this page.
    2. In n8n, open Workflows, create a new workflow and choose Import from File.
    3. Open each node that shows a warning and connect your own credentials.
    4. Run the workflow once manually to check the output before you activate it.
    Included in Pro
    • Importable n8n workflow JSON file
    • Download with Builder Pro or Agency Unlimited
    • Built for n8n v1.0++
    • Setup time: 30-60 min

    Included in Builder Pro — $19/mo, 4,177 premium workflows

    Before you activate

    Templates are reviewed before they are listed. Test with your own credentials and data before running it in production.

    Updated Mar 2026
    v1.0
    SSL
    Secure
    GDPR

    100% Secure Checkout

    Refund requests within 7 days of a new subscription

    Reviews

    0

    No reviews yet

    See all 0 reviews ↓
    —

    0 reviews

    5★
    0
    4★
    0
    3★
    0
    2★
    0
    1★
    0

    No reviews yet.

    Questions & Answers

    0

    Log in to ask a question.

    No questions yet. Be the first to ask!

    People Also Bought