Company RAG and data queries

Google Drive to Milvus RAG agent with Cohere embeddings

Short answer

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

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

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

Workflow architecture

  1. 1. Default Data Loader (AI layer) (connects to Insert into Milvus)
  2. 2. Embeddings Cohere (AI layer) (connects to Insert into Milvus)
  3. 3. When chat message received (Trigger) (connects to RAG Agent)
  4. 4. Watch New Files (Trigger) (connects to Download New)
  5. 5. Download New (Service and data) (connects to Extract from File)
  6. 6. Insert into Milvus (AI layer)
  7. 7. RAG Agent (AI layer)
  8. 8. Retrieve from Milvus (AI layer) (connects to RAG Agent)
  9. 9. OpenAI 4o (AI layer) (connects to RAG Agent)
  10. 10. Memory (AI layer) (connects to RAG Agent)
  11. 11. Cohere embeddings (AI layer) (connects to Retrieve from Milvus)
  12. 12. Set Chunks (AI layer) (connects to Default Data Loader)
  13. 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

Workflow steps

  1. 01

    Drive watch and PDF extraction

    When a new file enters the watched Drive folder, the workflow fetches it and extracts readable PDF text.

  2. 02

    Chunking and Cohere embeddings

    A recursive character splitter builds 700-character chunks before Cohere embed-multilingual-v3.0 generates dense vectors.

  3. 03

    Milvus collection insert

    Embedded document chunks are written into the configured Milvus vector collection for scalable similarity retrieval.

  4. 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

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.

Frequently asked

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.

Mert Can Gundogdu
The founder takes the call, not a sales team
Next step

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

Chat on WhatsApp