Google Drive to Milvus RAG agent with Cohere embeddings
This n8n workflow watches a Google Drive folder for newly created PDF files and extracts their text automatically. Content is split into 700-character chunks, embedded with Cohere multilingual vectors and inserted into a Milvus collection. Chat questions are answered by an OpenAI RAG agent retrieving the top ten chunks.
- Catalogue ID
- #0741
- Functional nodes
- 13
- Connections
- 11
- Trigger
- chatTrigger, googleDriveTrigger
- AI layer
- AI-assisted
Business problem solved
Teams managing multilingual product manuals and policy PDFs struggle with keyword search across separate languages. Without shared semantic indexing, staff miss relevant clauses and slow down responses.
Trigger
A Google Drive trigger watches for created files, while a chat trigger serves incoming team enquiries.
Connected systems
- Google Drive
- Milvus vector store
- Cohere multilingual embeddings
- OpenAI
- Chat interface
- Self-hosted n8n
Every workflow is deployed on your own server with documentation, a run log and an error queue.
Workflow architecture
- 1. Default Data Loader (AI layer) (connects to Insert into Milvus)
- 2. Embeddings Cohere (AI layer) (connects to Insert into Milvus)
- 3. When chat message received (Trigger) (connects to RAG Agent)
- 4. Watch New Files (Trigger) (connects to Download New)
- 5. Download New (Service and data) (connects to Extract from File)
- 6. Insert into Milvus (AI layer)
- 7. RAG Agent (AI layer)
- 8. Retrieve from Milvus (AI layer) (connects to RAG Agent)
- 9. OpenAI 4o (AI layer) (connects to RAG Agent)
- 10. Memory (AI layer) (connects to RAG Agent)
- 11. Cohere embeddings (AI layer) (connects to Retrieve from Milvus)
- 12. Set Chunks (AI layer) (connects to Default Data Loader)
- 13. Extract from File (Service and data) (connects to Insert into Milvus)
- Trigger
- AI layer
- Logic and routing
- Service and data
Node positions and directed links are generated from the verified catalogue record.
Workflow steps
- 01
Drive watch and PDF extraction
When a new file enters the watched Drive folder, the workflow fetches it and extracts readable PDF text.
- 02
Chunking and Cohere embeddings
A recursive character splitter builds 700-character chunks before Cohere embed-multilingual-v3.0 generates dense vectors.
- 03
Milvus collection insert
Embedded document chunks are written into the configured Milvus vector collection for scalable similarity retrieval.
- 04
Buffered OpenAI RAG response
Incoming chat queries invoke an OpenAI gpt-4o agent with buffered memory and top-10 Milvus retrieval.
Error queue and human approval
Built-in state in the catalogue workflow
The verified catalogue workflow contains zero node-level error flags across its 13 functional nodes and 11 connections.
Production layer added by ALTAI
During live deployment, ALTAI adds stale-vector cleanup on file updates, a corrupted-PDF error queue, role-based collection filters and a run log.
Milvus and Cohere Drive RAG agent Frequently asked questions
Cohere embed-multilingual-v3.0 handles mixed-language documents well, while Milvus scales cleanly over large vector collections.
Production deployments enforce file-type filtering and route extraction failures to an error queue without halting other files.
Yes. Self-hosted Milvus runs alongside n8n so documents and embeddings remain inside your private network.
Related n8n workflows
Drive and Pinecone Gemini RAG workflow
Tracks created and updated Google Drive files, embeds chunks with Google Gemini into Pinecone and serves grounded team chat answers.
Web article scraping Milvus RAG agent
Scrapes article links with HTML CSS selectors, cleans page body markup, writes chunks into Milvus and serves chat Q&A through OpenAI.
Pinecone cited structured RAG
Tags Google Drive documents with file metadata in Pinecone, retrieves numbered chunks and enforces structured citations mapped back to source URLs.

We write the proposal after we have found the problem together
In a thirty-minute call we listen to how you work and talk through where time and customers are slipping away. If you do not need a digital fix, we will tell you that too.
30 minutes · no preparation needed
The call and the week of discovery are both free.Read the terms