AutomationMart
Home/Browse/Document RAG & chat agent: Google Drive to Qdrant with Mistral OCR
n8n

Document RAG & chat agent: Google Drive to Qdrant with Mistral OCR

n8nn8n25 modulesv1.0
OpenAIGoogle DriveGoogle CalendarLinkedIn

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 to process documents. - A live chat agent that uses RAG (Retrieval-Augmented Generation) and optional web search to answer user questions. This system fully automates the creation of a “Chat with your

At a glance

Document RAG & chat agent: Google Drive to Qdrant with Mistral OCR is a ready-made n8n workflow you import as a workflow JSON file — no build required. It connects OpenAI, Google Drive, Google Calendar, LinkedIn. It's free to download. Follow the 5-step import below to go live in minutes.

Platform
n8n
Connects
OpenAI, Google Drive, Google Calendar, LinkedIn
Modules
25
Price
Free
Version
v1.0
Document RAG & chat agent: Google Drive to Qdrant with Mistral OCR workflow diagram

About this workflow

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 to process documents. - A live chat agent that uses RAG (Retrieval-Augmented Generation) and optional web search to answer user questions. This system fully automates the creation of a “Chat with your docs” solution and enhances it with external web-searching capabilities. --- Quick Implementation Steps 1. Import the workflow JSON into your n8n instance. 2. Set up credentials for Google Drive, Mistral AI, OpenAI, and Qdrant. 3. Open the Web Search node and add your Tavily AI API key to the Authorization header. 4. In the Google Drive (List Files) node, set the Folder ID you want to ingest. 5. Run the workflow manually once to populate your Qdrant database (Flow 1). 6. Activate the workflow to enable the chat trigger (Flow 2). 7. Copy the public webhook URL from the When chat message received node and open it in a new tab to start chatting. --- What It Does The workflow is divided into two primary functions: 1. Knowledge Base Ingestion (Manual Trigger) This flow populates your vector database. - Scans Google Drive: Lists all files from a specified folder. - Processes Files Individually: Downloads each file. - Extracts Text via OCR: Uses Mistral AI OCR API for text extraction from PDFs, images, etc. - Generates Smart Metadata: A Mistral LLM assigns metadata like documenttype, project, and assignedto. - Chunks & Embeds: Text is cleaned, chunked, and embedded via OpenAI’s text-embedding-3-small model. - Stores in Qdrant: Text chunks, embeddings, and metadata are stored in a Qdrant collection (docaiauto). 2. AI Chat Agent (Chat Trigger) This flow powers the conversational interface. - Handles User Queries: Triggered when a user sends a chat message. - Internal RAG Retrieval: Searches Qdrant Vector Store first for answers. - Web Search Fallback: If unavailable internally, the agent offers to perform a Tavily AI web search. - Contextual Responses: Combines internal and external info for comprehensive answers. --- Who's It For Ideal for: - Teams building internal AI knowledge bases from Google Drive. - Developers creating AI-powered support, research, or onboarding bots. - Organizations implementing RAG pipelines. - Anyone making unstructured Google Drive documents searchable via chat. --- Requirements - n8n instance (self-hosted or cloud). - Google Drive Credentials (to list and download files). - Mistral AI API Key (for OCR & metadata extraction). - OpenAI API Key (for embeddings and chat LLM). - Qdrant instance (cloud or self-hosted). - Tavily AI API Key (for web search). --- How It Works The workflow runs two independent flows in parallel: Flow 1: Ingestion Pipeline (Manual Trigger) 1. List Files: Fetch files from Google Drive using the Folder ID. 2. Loop & Download: Each file is processed one by one. 3. OCR Processing: - Upload file to Mistral - Retrieve signed URL - Extract text using Mistral DOC OCR 4. Metadata Extraction: Analyze text using a Mistral LLM. 5. Text Cleaning & Chunking: Split into 1000-character chunks. 6. Embeddings Creation: Use OpenAI embeddings. 7. Vector Insertion: Push chunks + metadata into Qdrant. Flow 2: AI Chat Agent (Chat Trigger) 1. Chat Trigger: Starts when a chat message is received. 2. AI Agent: Uses OpenAI + Simple Memory to process context. 3. RAG Retrieval: Queries Qdrant for related data. 4. Decision Logic: - Found → Form answer. - Not found → Ask if user wants web search. 5. Web Search: Performs Tavily web lookup. 6. Final Response: Synthesizes internal + external info. --- How To Set Up 1. Import the Workflow Upload the provided JSON into your n8n instance. 2. Configure Credentials Create and assign: - Google Drive → Google Drive nodes - Mistral AI → Upload, Signed URL, DOC OCR, Cloud Chat Model - OpenAI → Embeddings + Chat Model nodes - Qdrant → Vector Store nodes 3. Add Tavily API Key - Open Web Search node → Parameters → Headers - Add your key under Authorization (e.g., tvly-xxxx). 4. Node Configuration - Google Drive (List Files): Set Folder ID. - Qdrant Nodes: Ensure same collection name (docaiauto). 5. Run Ingestion (Flow 1) Click Test workflow to populate Qdrant with your Drive documents. 6. Activate Chat (Flow 2) Toggle the workflow ON to enable real-time chat. 7. Test Open the webhook URL and start chatting! --- How To Customize - Change LLMs: Swap models in OpenAI or Mistral nodes (e.g., GPT-4o, Claude 3). - Modify Prompts: Edit the system message in ai chat agent to alter tone or logic. - Chunking Strategy: Adjust chunkSize and chunkOverlap in the Code node. - Different Sources: Replace Google Drive with AWS S3, Local Folder, etc. - Automate Updates: Add a Cron node for scheduled ingestion. - Validation: Add post-processing steps after metadata extraction. - Expand Tools: Add more functional nodes like Google Calendar or Calculator. --- Use Case Examples - Internal HR Bot: Answer HR-related queries from stored policy docs. - Tech Support Assistant: Retrieve troubleshooting steps for products. - Research Assistant: Summarize and compare market reports. - Project Management Bot: Query document ownership or project status. --- Troubleshooting Guide | Issue | Possible Solution | |------------|------------------------| | Chat agent doesn’t respond | Check OpenAI API key and model availability (e.g., gpt-4.1-mini). | | Known documents not found | Ensure ingestion flow ran and both Qdrant nodes use same collection name. | | OCR node fails | Verify Mistral API key and input file integrity. | | Web search not triggered | Re-check Tavily API key in Web Search node headers. | | Incorrect metadata | Tune Information Extractor prompt or use a stronger Mistral model. | --- Need Help or More Workflows? Want to customize this workflow for your business or integrate it with your existing tools? Our team at Digital Biz Tech can tailor it precisely to your use case from automation logic to AI-powered enhancements. We can help you set it up for free — from connecting credentials to deploying it live. Contact: rajeet.nair@digitalbiz.tech Website: LinkedIn: You can also DM us on LinkedIn for any help. ---

n8n

How to import this n8n workflow

  1. 1

    Download the workflow JSON file after purchase.

  2. 2

    Open n8n → click the menu → Import from File.

  3. 3

    Select the downloaded JSON and import.

  4. 4

    Set up credentials for each node that requires them.

  5. 5

    Click Execute Workflow to test, then activate.

Setup guide

Setup guide included

Purchase to unlock the full step-by-step guide

Related N8n workflows

Monitor Reddit for sales opportunities with GPT-4o and create Asana tasks

Description Automate sales opportunity discovery by continuously analyzing Reddit discussions for real buying intent using AI. 🔍🤖 This workflow runs every two hours, searches Reddit posts via Google, evaluates each discussion with a conservative AI model, and determines whether it represents a genuine sales opportunity. High-quality opportunities are enriched with intent level, problem summary, confidence score, and recommended next action—then automatically converted into Asana tasks with real-

Free

Send automated email responses using GMAIL and ChatGPT assistant

Automatically respond to new Gmail messages using ChatGPT assistant with send personalized replies back through Google Email.

Free

AI Linux system administrator for managing Linux VPS instance

This n8n workflow template is designed for developers, system administrators, and IT professionals who manage Linux VPS environments. It leverages an AI chatbot powered by the OpenAI model to interpret and execute SSH commands on a Linux VPS directly from chat messages. The workflow triggers when a specific chat message is received, which is then processed by the AI SysAdmin ReAct Agent to execute predefined SSH commands securely. How It Works 1. Chat Trigger: The workflow starts when a chat mes

Free

AI icebreaker builder: scrape sites with Dumpling AI and save to Airtable

Who is this for? This workflow is ideal for sales teams, marketers, and virtual assistants who manage outbound campaigns and want to improve their cold outreach personalization. It helps automate the research and writing process for each lead, saving time while improving quality. What problem is this workflow solving? Cold outreach often lacks personalization because manually reviewing each lead's website takes time. This workflow eliminates that bottleneck by using AI to auto-gener

Free

Enrich company data with ChatGPT and Google Sheets

Automatically enrich your company data using the power of ChatGPT integrated with Google Sheets. This template ensures quick access to comprehensive business insights, enhancing decision-making and streamlining your data management processes.

Free

Back up self-hosted workflows to Google Drive daily with change detection

This workflow creates a daily, automated backup of all workflows in a self-hosted n8n instance and stores them in Google Drive. Instead of exporting every workflow on every run, it uses content hashing to detect meaningful changes and only updates backups when a workflow has actually been modified. To keep Google Drive clean and predictable, the workflow intentionally deletes the existing backup file before uploading the updated version. This avoids duplicate files and ensures there

Free

Automated web scraping: email a CSV, save to Google Sheets & Microsoft Excel

How it works: The workflow starts by sending a request to a website to retrieve its HTML content. It then parses the HTML extracting the relevant information The extracted data is storted and converted into a CSV file. The CSV file is attached to an email and sent to your specified address. The data is simultaneously saved to both Google Sheets and Microsoft Excel for further analysis or use. Set-up steps: 1. Change the website to scrape in the "Fetch website content" node 2. Configure Micr

Free

🔐 Double opt-in email verification system with Google Sheets

This template implements a professional Double Opt-In email verification system using Google Sheets as a database. The workflow collects user emails, generates unique verification codes, stores them securely, and validates user access before proceeding with your main form. How it Works 1. User submits their email through an initial form 2. System generates a unique 6-digit verification code 3. Code is stored in Google Sheets along with user data 4. Verification email is sent to the user 5. User

Free

Reviews

No reviews yet

Be the first to buy and share your experience.

Leave a review

Sign in to share your experience with this workflow.

Log in to review
Free
No ratings yet

Create a free account to purchase workflows.

  • JSON blueprint — instant download
  • Setup guide PDF included
  • 5 downloads · valid 30 days
  • Works with n8n

Need help setting this up?

Book a 3-hour live setup session with an Agility consultant.

₹2,499/ session
3 hrs · video call
  • Configure live on Google Meet / Zoom
  • Free follow-up if workflow has defects
  • Platform expert assigned to you
Book installation session
Free