Skip to content
FlowHubFluxonLab
A
AI Automationfree

Build a Document QA System with RAG using Milvus, Cohere, and OpenAI for Google Drive

by Aitor | 1Nodeadapted from n8n official workflow galleryUpdated Aug 2026
RequiresAAI AgentDDefault Data LoaderEmbeddings CohereEmbeddings CohereGoogle DriveGoogle DriveMilvus Vector StoreMilvus Vector StoreOpenAI Chat ModelOpenAI Chat ModelRecursive Character Text SplitterRecursive Character Text SplitterSSimple Memory
Share Post Share
DDDefault Data LoaderDefault Data Lo…ECEmbeddings CohereEmbeddings Cohe…ChWhen chat message receivedWhen chat messa…GDWatch New FilesDownload NewVSInsert into MilvusInsert into Mil…AgRAG AgentVSRetrieve from MilvusRetrieve from M…OpenAI 4oMBMemoryECCohere embeddingsCohere embeddin…TSSet ChunksEFExtract from FileExtract from Fi…123456
1/5
FLOWS
STEPS · 6
Starts on a Google Drive event

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. Watch New Files: Triggers when a new file (specifically targeting PDFs) is added to a designated Google Drive folder. Download New: Downloads the newly added file from Google Drive. Extract from File: Extracts text content from the downloaded PDF file. Default Data Loader / Set Chunks: Processes the extracted text, splitting it into manageable chunks for embedding. Embeddings Cohere: Generates vector embeddings for each text chunk using the Cohere API. Insert into Milvus: Inserts the generated vector embeddings and associated metadata into a Milvus vector database.

Tags

n8nreference-onlyagentdocument-default-data-loaderembeddings-coheregoogle-drivelm-chat-open-aimemory-buffer-windowtext-splitter-recursive-character-text-splittervector-store-milvus
Connects
AAI AgentDDefault Data LoaderembeddingscohereEmbeddings CoheregoogledriveGoogle DrivemilvusvectorstoreMilvus Vector StoreopenaichatmodelOpenAI Chat Model
CategoryAI Automation
Triggermanual
Complexitycomplex
Nodes13
AddedMay 3, 2025

Related workflows

See all AI Automation
ACDgmail
free

AI: Summarize podcast episode and enhance using Wikipedia

The workflow automates the process of creating a summarized and enriched podcast digest, which is then sent via email. Note that to use this template, you need to be on n8n version 1.19.4 or later.

by n8n Team
DhtmlWopenaichatmodel
free

Scrape and summarize webpages with AI

This workflow integrates both web scraping and NLP functionalities. It uses HTML parsing to extract links, HTTP requests to fetch essay content, and AI-based summarization using GPT-4o. It's an excellent example of an end-to-end automated task that is not only efficient but also provides real value by summarizing valuable content. Note that to use this template, you need to be on n8n version 1.50.0 or later.

by n8n Team
binaryinputloaderembeddingsopenaigoogledriveopenaichatmodel
free

Ask questions about a PDF using AI

The workflow first populates a Pinecone index with vectors from a Bitcoin whitepaper. Then, it waits for a manual chat message. When received, the chat message is turned into a vector and compared to the vectors in Pinecone. The most similar vectors are retrieved and passed to OpenAI for generating a chat response. Note that to use this template, you need to be on n8n version 1.19.4 or later.

by David Roberts