AutomationMart
Home/Browse/Build a document QA system with RAG using Milvus, Cohere, and OpenAI for Google Drive
n8n

Build a document QA system with RAG using Milvus, Cohere, and OpenAI for Google Drive

n8nn8n13 modulesv1.0
SlackOpenAIGoogle Drive

Template Description This template creates a powerful Retrieval Augmented Generation (RAG) AI agent workflow in n8n. It monitors a specified Google Drive folder for new PDF files, extracts their content, generates vector embeddings using Cohere, and stores these embeddings in a Milvus vector database. Subsequently, it enables a RAG agent that can retrieve relevant information from the Milvus database based on user queries and generate responses using OpenAI, enhanced by the retrieved context. Fu

At a glance

Build a document QA system with RAG using Milvus, Cohere, and OpenAI for Google Drive is a ready-made n8n workflow you import as a workflow JSON file — no build required. It connects Slack, OpenAI, Google Drive. It's free to download. Follow the 5-step import below to go live in minutes.

Platform
n8n
Connects
Slack, OpenAI, Google Drive
Modules
13
Price
Free
Version
v1.0
Build a document QA system with RAG using Milvus, Cohere, and OpenAI for Google Drive workflow diagram

About this workflow

Template Description This template creates a powerful Retrieval Augmented Generation (RAG) AI agent workflow in n8n. It monitors a specified Google Drive folder for new PDF files, extracts their content, generates vector embeddings using Cohere, and stores these embeddings in a Milvus vector database. Subsequently, it enables a RAG agent that can retrieve relevant information from the Milvus database based on user queries and generate responses using OpenAI, enhanced by the retrieved context. Functionality The workflow automates the process of ingesting documents into a vector database for use with a RAG system. 1. Watch New Files: Triggers when a new file (specifically targeting PDFs) is added to a designated Google Drive folder. 2. Download New: Downloads the newly added file from Google Drive. 3. Extract from File: Extracts text content from the downloaded PDF file. 4. Default Data Loader / Set Chunks: Processes the extracted text, splitting it into manageable chunks for embedding. 5. Embeddings Cohere: Generates vector embeddings for each text chunk using the Cohere API. 6. Insert into Milvus: Inserts the generated vector embeddings and associated metadata into a Milvus vector database. 7. When chat message received: Adapt the trigger tool to fit your needs. 8. RAG Agent: Orchestrates the RAG process. 9. Retrieve from Milvus: Queries the Milvus database with the user's chat query to find the most relevant chunks. 10. Memory: Manages conversation history for the RAG agent to optimize cost and response speed. 11. OpenAI / Cohere embeddings: Uses ChatGPT 4o for text generation. Requirements To use this template, you will need: An n8n instance (cloud or self-hosted). Access to a Google Drive account to monitor a folder. A Milvus instance or access to a Milvus cloud service like Zilliz. A Cohere API key for generating embeddings. An OpenAI API key for the RAG agent's text generation. Usage 1. Set up the required credentials in n8n for Google Drive, Milvus, Cohere, and OpenAI. 2. Configure the "Watch New Files" node to point to the Google Drive folder you want to monitor for PDFs. 3. Ensure your Milvus instance is running and the target cluster is set up correctly. 4. Activate the workflow. 5. Add PDF files to the monitored Google Drive folder. The workflow will automatically process them and insert their embeddings into Milvus. 6. Interact with the RAG agent. The agent will use the data in Milvus to provide context-aware answers. Benefits Automates document ingestion for RAG applications. Leverages Milvus for high-performance vector storage and search. Uses Cohere for generating high-quality text embeddings. Enables building a context-aware AI agent using your own documents. Suggested improvements Support for More File Types: Extend the "Watch New Files" node and subsequent extraction steps to handle various document types (e.g., .docx, .txt, .csv, web pages) in addition to PDFs. Error Handling and Notifications: Implement robust error handling for each step of the workflow (e.g., failed downloads, extraction errors, Milvus insertion failures) and add notification mechanisms (e.g., email, Slack) to alert the user. Get in touch with us Contact us at

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

Send messages in Slack when new deals are accepted in Teamleader

Every time a new deal are accepted in Teamleader, Make will automatically send a message to your Slack.

Free

YouTube comment scraper & analyzer with GPT-4o + email summary report

How it Works ## This workflow automates the collection and analysis of YouTube comments from a video and sends a summary report via email, using Google Sheets, the YouTube API, OpenAI (GPT-4o), and Gmail. Whether you're a content creator, brand manager, or social media analyst, this workflow helps you automate sentiment analysis and receive insights directly in your inbox — all triggered from a simple spreadsheet. 🎯 Use Case Ideal for: - YouTubers monitoring audience sentiment - Marketing teams

Free

Send Slack messages for new Google Forms responses

Every time a new response is entered on your Google Form, Make will automatically send a message in Slack.

Free

Manage Odoo CRM with natural language using OpenAI and MCP Server

Odoo CRM MCP Server Workflow 📖 Overview This workflow connects an AI Agent with Odoo CRM using the Model Context Protocol (MCP). It allows users to manage CRM data in Odoo through natural language chat commands. The assistant interprets the user’s request, selects the appropriate Odoo action, and executes it seamlessly. 🔹 Key Features - Contacts Management: Create, update, delete, and retrieve contacts. - Opportunities Management: Create, update, delete, and retrieve opportunities. - Notes

Free

Automate responses to business emails with ChatGPT and Google Sheets (draft emails)

Leverage the power of ChatGPT and Google Sheets to automate responses for business emails, improve workflow, save time, and enhance customer communications for better results.

Free

Send a message to Slack when a new record in Attio is created

Every time a new record is created in the watched Attio Collection, Make will automatically send a message to the selected Slack channel.

Free

Webhook-enabled AI PDF analyzer

Who this template is for This template is for researchers, students, professionals, or content creators who need to quickly extract and summarize key insights from PDF documents using AI-powered analysis. Use case Converting lengthy PDF documents into structured, digestible summaries organized by topic with key insights. This is particularly useful for processing research papers, reports, whitepapers, or any document where you need to quickly understand the main topics and extract actio

Free

Score and route inbound web leads with OpenAI, Gmail and Google Sheets

Quick overview This workflow receives web form submissions via webhook, uses OpenAI to score and classify each lead, then emails hot leads through Gmail and logs them to separate Google Sheets tabs for hot versus cold review. How it works 1. Receives a POST webhook request containing lead details (name, email, company, role, message). 2. Normalizes the incoming fields and adds a timestamp. 3. Sends the lead details to OpenAI Chat Completions to return a JSON score (1–10), intent label, and one-s

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