Skip to main content

Build a PDF search system with Mistral OCR and Weaviate DB

Workflow preview

Workflow preview
100%
Build a PDF search system with Mistral OCR and Weaviate DB preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Build a PDF to Vector RAG System: Mistral OCR, Weaviate Database and MCP Server A comprehensive RAG (Retrieval Augmented Generation) workflow that transforms PDF documents into searchable vector em...

Best for

  • Document Extraction automation workflows
  • Multimodal AI automation workflows
  • intermediate n8n builders looking for reusable templates

Tools used

@n8n/n8n-nodes-langchain.embeddingscohere, @n8n/n8n-nodes-langchain.documentdefaultdataloader, @n8n/n8n-nodes-langchain.rerankercohere, @n8n/n8n-nodes-langchain.mcptrigger, @n8n/n8n-nodes-langchain.vectorstoreweaviate, n8n-nodes-base.stickynote, @n8n/n8n-nodes-langchain.textsplitterrecursivecharactertextsplitter, n8n-nodes-base.formtrigger

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Dietmar.

Original n8n.io source

1.1 Workflow description

Title
Build a PDF search system with Mistral OCR and Weaviate DB
Workflow name
Build a PDF search system with Mistral OCR and Weaviate DB

Build a PDF to Vector RAG System: Mistral OCR, Weaviate Database and MCP Server

A comprehensive RAG (Retrieval-Augmented Generation) workflow that transforms PDF documents into searchable vector embeddings using advanced AI technologies.

πŸš€ Features

  • PDF Document Processing: Upload and extract text from PDF files using Mistral's OCR capabilities
  • Vector Database Storage: Store document embeddings in Weaviate vector database for efficient retrieval
  • AI-Powered Search: Search through documents using semantic similarity with Cohere embeddings
  • MCP Server Integration: Expose the knowledge base as an AI tool through MCP (Model Context Protocol)
  • Document Metadata: Basic document metadata including filename, content, source, and upload timestamp
  • Text Chunking: Automatic text splitting for optimal vector storage and retrieval

πŸ› οΈ Technologies Used

  • Mistral AI: OCR and text extraction from PDF documents
  • Weaviate: Vector database for storing and retrieving document embeddings
  • Cohere: Multilingual embeddings and reranking for improved search accuracy
  • MCP (Model Context Protocol): AI tool integration for external AI workflows
  • n8n: Workflow automation and orchestration

πŸ“‹ Prerequisites

Before using this template, you'll need to set up the following credentials:

  1. Mistral Cloud API: For PDF text extraction
  2. Weaviate API: For vector database operations
  3. Cohere API: For embeddings and reranking
  4. HTTP Header Auth: For MCP server authentication

πŸ”§ Setup Instructions

  1. Import the template into your n8n instance
  2. Configure credentials for all required services
  3. Set up Weaviate collection named "KnowledgeDocuments"
  4. Configure webhook paths for the MCP server and form trigger
  5. Test the workflow by uploading a PDF document

πŸ“Š Workflow Overview

PDF Upload β†’ Text Extraction β†’ Document Processing β†’ Vector Storage β†’ AI Search
     ↓              ↓                ↓                ↓              ↓
  Form Trigger β†’ Mistral OCR β†’ Prepare Metadata β†’ Weaviate DB β†’ MCP Server

🎯 Use Cases

  • Knowledge Base Management: Create searchable repositories of company documents
  • Research Documentation: Process and search through research papers and reports
  • Legal Document Search: Index and search through legal documents and contracts
  • Technical Documentation: Make technical manuals and guides searchable
  • Academic Literature: Process and search through academic papers and publications

⚠️ Important Notes

  • Model Consistency: Use the same embedding model for both storage and retrieval
  • Collection Management: Ensure your Weaviate collection is properly configured
  • API Limits: Be aware of rate limits for Mistral, Cohere, and Weaviate APIs
  • Document Size: Consider chunking large documents for optimal processing

πŸ”— Related Resources

πŸ“ License

This template is provided as-is for educational and commercial use.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Cohere Embeddings

Type / Role
@n8n/n8n-nodes-langchain.embeddingsCohere - embeddingsCohere
Config choices
Version 1

Block 2 - Document Loader

Type / Role
@n8n/n8n-nodes-langchain.documentDefaultDataLoader - documentDefaultDataLoader
Config choices
Version 1.1

Block 3 - Cohere Reranker

Type / Role
@n8n/n8n-nodes-langchain.rerankerCohere - rerankerCohere
Config choices
Version 1

Block 4 - MCP Knowledge Server

Type / Role
@n8n/n8n-nodes-langchain.mcpTrigger - mcpTrigger
Config choices
Version 2

Block 5 - Search Knowledge Base

Type / Role
@n8n/n8n-nodes-langchain.vectorStoreWeaviate - vectorStoreWeaviate
Config choices
Version 1.3

Block 6 - Upload Instructions

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 7 - Text Splitter

Type / Role
@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter - textSplitterRecursiveCharacterTextSplitter
Config choices
Version 1

Block 8 - Upload PDF

Type / Role
n8n-nodes-base.formTrigger - formTrigger
Config choices
Version 2.2

Block 9 - Extract Text from PDF

Type / Role
n8n-nodes-base.mistralAi - mistralAi
Config choices
Version 1

Block 10 - Prepare Document Data

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 11 - Store in Vector Database

Type / Role
@n8n/n8n-nodes-langchain.vectorStoreWeaviate - vectorStoreWeaviate
Config choices
Version 1.3

Block 12 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 13 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Build a PDF search system with Mistral OCR and Weaviate DB
Complexity intermediate
Nodes 13
Categories Document Extraction, Multimodal AI
Author Dietmar
Published 13 Aug 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/7339/7339.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Build a PDF search system with Mistral OCR and Weaviate DB do?

Build a PDF to Vector RAG System: Mistral OCR, Weaviate Database and MCP Server A comprehensive RAG (Retrieval Augmented Generation) workflow that transforms PDF documents into searchable vector em...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Document Extraction, Multimodal AI use case.