Skip to main content

Process documents & build semantic search with OpenAI, Gemini & Qdrant

Workflow preview

Workflow preview
100%
Process documents & build semantic search with OpenAI, Gemini & Qdrant preview
Open on n8n.io

Important notice

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

1. Workflow Overview

This n8n workflow automates the process of ingesting documents from multiple sources (Google Drive and web forms) into a Qdrant vector database for semantic search capabilities. It handles batch pr...

Best for

  • AI RAG automation workflows
  • Multimodal AI automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.googledrive, @n8n/n8n-nodes-langchain.vectorstoreqdrant, @n8n/n8n-nodes-langchain.embeddingsopenai, n8n-nodes-base.stickynote, @n8n/n8n-nodes-langchain.documentdefaultdataloader, n8n-nodes-base.formtrigger, @n8n/n8n-nodes-langchain.textsplitterrecursivecharactertextsplitter, n8n-nodes-base.splitinbatches

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Process documents & build semantic search with OpenAI, Gemini & Qdrant
Workflow name
Process documents & build semantic search with OpenAI, Gemini & Qdrant

🎯 Overview

This n8n workflow automates the process of ingesting documents from multiple sources (Google Drive and web forms) into a Qdrant vector database for semantic search capabilities. It handles batch processing, document analysis, embedding generation, and vector storage - all while maintaining proper error handling and execution tracking.

πŸš€ Key Features

  • Dual Input Sources: Accepts files from both Google Drive folders and web form uploads
  • Batch Processing: Processes files one at a time to prevent memory issues and ensure reliability
  • AI-Powered Analysis: Uses Google Gemini to extract metadata and understand document context
  • Vector Embeddings: Generates OpenAI embeddings for semantic search capabilities
  • Automated Cleanup: Optionally deletes processed files from Google Drive (configurable)
  • Loop Processing: Handles multiple files efficiently with Split In Batches nodes
  • Interactive Chat Interface: Built-in chatbot for testing semantic search queries against indexed documents

πŸ“‹ Use Cases

  • Knowledge Base Creation: Build searchable document repositories for organizations
  • Document Compliance: Process and index legal/regulatory documents (like Fair Work documents)
  • Content Management: Automatically categorize and store uploaded documents
  • Research Libraries: Create semantic search capabilities for research papers or reports
  • Customer Support: Enable instant answers to policy and documentation questions via chat interface

πŸ”§ Workflow Components

Input Methods

  1. Google Drive Integration

    • Monitors a specific folder for new files
    • Processes existing files in batch mode
    • Supports automatic file conversion to PDF
  2. Web Form Upload

    • Public-facing form for document submission
    • Accepts PDF, DOCX, DOC, and CSV files
    • Processes multiple file uploads in a single submission

Processing Pipeline

  1. File Splitting: Separates multiple uploads into individual items
  2. Document Analysis: Google Gemini extracts document understanding
  3. Text Extraction: Converts documents to plain text
  4. Embedding Generation: Creates vector embeddings via OpenAI
  5. Vector Storage: Inserts documents with embeddings into Qdrant
  6. Loop Control: Manages batch processing with proper state handling

Key Nodes

  • Split In Batches: Processes files one at a time with reset: false to maintain state
  • Google Gemini: Analyzes documents for context and metadata
  • Langchain Vector Store: Handles Qdrant insertion with embeddings
  • HTTP Request: Direct API calls for custom operations
  • Chat Interface: Interactive chatbot for testing vector search queries

πŸ› οΈ Technical Implementation

Batch Processing Logic

The workflow uses a clever looping mechanism:

  • Split In Batches with batchSize: 1 ensures single-file processing
  • reset: false maintains loop state across iterations
  • Loop continues until all files are processed

Error Handling

  • All nodes include continueOnFail options where appropriate
  • Execution logs are preserved for debugging
  • File deletion only occurs after successful insertion

Data Flow

Form Upload β†’ Split Files β†’ Batch Loop β†’ Analyze β†’ Insert β†’ Loop Back
Google Drive β†’ List Files β†’ Batch Loop β†’ Download β†’ Analyze β†’ Insert β†’ Delete β†’ Loop Back

πŸ“Š Performance Considerations

  • Processing Time: ~20-30 seconds per file
  • Batch Size: Set to 1 for reliability (configurable)
  • Memory Usage: Optimized for files under 10MB
  • API Costs: Uses OpenAI embeddings (text-embedding-3-large model)

πŸ” Required Credentials

  1. Google Drive OAuth2: For file access and management
  2. OpenAI API: For embedding generation
  3. Qdrant API: For vector database operations
  4. Google Gemini API: For document analysis

πŸ’‘ Implementation Tips

  1. Start Small: Test with a few files before processing large batches
  2. Monitor Costs: Track OpenAI API usage for embedding generation
  3. Backup First: Consider archiving instead of deleting processed files
  4. Check Collections: Ensure Qdrant collection exists before running

🎨 Customization Options

  • Change Embedding Model: Switch to text-embedding-3-small for cost savings
  • Adjust Chunk Size: Modify text splitting parameters for different document types
  • Add Metadata: Extend the Gemini prompt to extract specific fields
  • Archive vs Delete: Replace delete operation with move to "processed" folder

πŸ“ˆ Real-World Application

This workflow was developed to process business documents and legal agreements, making them searchable through semantic queries. It's particularly useful for organizations dealing with large volumes of regulatory documentation that need to be quickly accessible and searchable.

Chat Interface Testing

The integrated chatbot interface allows users to:

  • Query processed documents using natural language
  • Test semantic search capabilities in real-time
  • Verify document indexing and retrieval accuracy
  • Ask questions about specific topics (e.g., "What are the pay rates for junior employees?")
  • Get instant AI-powered responses based on the indexed content

🌟 Benefits

  • Automation: Eliminates manual document processing
  • Scalability: Handles individual files or bulk uploads
  • Intelligence: AI-powered understanding of document content
  • Flexibility: Multiple input sources and processing options
  • Reliability: Robust error handling and state management

πŸ‘¨β€πŸ’» About the Creator

Jeremy Dawes is the CEO of Jezweb, specializing in AI and automation deployment solutions. This workflow represents practical, production-ready automation that solves real business challenges while maintaining simplicity and reliability.

πŸ“ Notes

  • The workflow intelligently handles the n8n form upload pattern where multiple files create a single item with multiple binary properties (Files_0, Files_1, etc.)
  • The Split In Batches pattern with reset: false is crucial for proper loop execution
  • Direct API integration provides more control than pure Langchain implementations

πŸ”— Resources


This workflow demonstrates practical automation that bridges document management with modern AI capabilities, creating intelligent document processing systems that scale with your needs.

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 - Download File

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 2 - Insert to Qdrant

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

Block 3 - Embeddings OpenAI

Type / Role
@n8n/n8n-nodes-langchain.embeddingsOpenAi - embeddingsOpenAi
Config choices
Version 1.2

Block 4 - Delete File

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 5 - πŸ”΅ Workflow Overview

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

Block 6 - 🟑 Trigger Configuration

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

Block 7 - 🟒 Batch Processing Logic

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

Block 8 - πŸ”΄ DELETE WARNING

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

Block 9 - 🟒 Document Pipeline

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

Block 10 - 🟑 Setup Requirements

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

Block 11 - 🟣 Performance Tips

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

Block 12 - 🟠 Troubleshooting

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

Block 13 - 🟣 Alternative Approaches

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

Block 14 - 🟑 Setup Requirements1

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

Block 15 - Insert to Qdrant1

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

Block 16 - Embeddings OpenAI1

Type / Role
@n8n/n8n-nodes-langchain.embeddingsOpenAi - embeddingsOpenAi
Config choices
Version 1.2

Block 17 - Data Loader for Google Drive Files

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

Block 18 - Data Loader for Form Files

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

Block 19 - File Upload Form

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

Block 20 - 🟒 Batch Processing Logic1

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

Block 21 - Recursive Character Text Splitter 1

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

Block 22 - Recursive Character Text Splitter 2

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

Block 23 - Split Form Batches

Type / Role
n8n-nodes-base.splitInBatches - splitInBatches
Config choices
Version 3

Block 24 - List Files in Google Drive Folder

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Showing the first 24 of 35 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Process documents & build semantic search with OpenAI, Gemini & Qdrant
Complexity advanced
Nodes 35
Categories AI RAG, Multimodal AI
Author Jez
Published 26 Aug 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/7882/7882.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 Process documents & build semantic search with OpenAI, Gemini & Qdrant do?

This n8n workflow automates the process of ingesting documents from multiple sources (Google Drive and web forms) into a Qdrant vector database for semantic search capabilities. It handles batch pr...

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 AI RAG, Multimodal AI use case.