# Document RAG & chat agent: Google Drive to Qdrant with Mistral: n8n workflow

> Started by someone opening a chat with it, and works across Google Drive and Qdrant. It puts Mistral and OpenAI behind a retrieval step, so answers are...

Source: https://millionrounds.com/workflow/document-rag-and-chat-agent-google-drive-to-qdrant-with-mist (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Documents and files](https://millionrounds.com/workflows?category=Documents+and+files#library)

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

Started by someone opening a chat with it, and works across Google Drive and Qdrant. It puts Mistral and OpenAI behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 25 steps, 1 branch, 1 loop or waits: large, and worth reading before you trust it with anything live.

Large Calls a model: Mistral, OpenAI Retrieval

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fdocument-rag-and-chat-agent-google-drive-to-qdrant-with-mist)

**25 steps** Large: read it before trusting it with anything live

**1** Branch: places the flow splits

**1** Loop or waits

**2** Services it connects to

## The flow

Starts it 2 Model 12 Logic 6 Service 5

The steps in the order they run, from what starts it.

- 1 **Embeddings OpenAI1** Embeddings Open Ai *Model*
- 2 **OpenAI Chat Model1** Lm Chat Open Ai *Model*
- 3 **Web Search** Tool Http Request *Model*
- 4 **Simple Memory1** Memory Buffer Window *Model*
- 5 **When chat message received** Chat trigger *Starts it*
- 6 **Character Text Splitter** Text Splitter Character Text Splitter *Model*
- 7 **When clicking ‘Test workflow’** Manual trigger *Starts it*
- 8 **Embeddings OpenAI** Embeddings Open Ai *Model*
- 9 **Mistral Cloud Chat Model** Lm Chat Mistral Cloud *Model*
- 10 **Qdrant Vector Store** Vector Store Qdrant *Model*
- 11 **ai chat agent** Agent *Model*
- 12 **Default Data Loader** Document Default Data Loader *Model*
- 13 **Google Drive** Google Drive *Service*
- 14 **Qdrant Vector Store1** Vector Store Qdrant *Model*
- 15 **based file name it assign differ metadata** Information Extractor *Model*
- 16 **Loop Over each file in gdrive folder** Split In Batches *Logic*
- 17 **set all metadata** Set *Logic*
- 18 **add metadata** Set *Logic*
- 19 **clean output** Code *Logic*
- 20 **Google Drive1** Google Drive *Service*
- 21 **convert data into smaller chunks** Code *Logic*
- 22 **Mistral Upload** Http Request *Service*
- 23 **Mistral Signed URL** Http Request *Service*
- 24 **Mistral DOC OCR** Http Request *Service*
- 25 **If NODE** If *Logic*

## How it's built

- **Starts on:** Someone opening a chat with it
- **Steps:** 25, with 1 branch, 1 loop or waits
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Google Drive, Qdrant
- **Model:** Mistral, OpenAI
- **Retrieval:** Answers are drawn from documents you supply, not from the model alone

## Questions

What does it need to run?

An n8n account, plus your own Google Drive and Qdrant accounts, and a key for Mistral and OpenAI. You connect your own accounts after importing it; none are included.

What starts it?

It starts on someone opening a chat with it.

Does it use AI?

Yes. It calls Mistral and OpenAI. Its answers draw on documents you give it, not on the model alone. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 25 steps it is large: read it before trusting it with anything live.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

**Before you run it**

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 25 steps before you point it at anything that matters.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fdocument-rag-and-chat-agent-google-drive-to-qdrant-with-mist)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Connects to

Each opens the other workflows that use it.

[Google Drive](https://millionrounds.com/workflows?service=Google+Drive#library)[Qdrant](https://millionrounds.com/workflows?service=Qdrant#library)

## Workflows like it

Also documents and files, with the same services where possible, closest in size first.

- [**Review contract risk and rewrite clauses with Groq** 25 steps · calls a model · Google Drive, Notion](https://millionrounds.com/workflow/review-contract-risk-and-rewrite-clauses-with-groq)
- [**Extract text from Google Drive files to Google Sheets** 25 steps · Google Docs, Google Drive](https://millionrounds.com/workflow/extract-text-from-google-drive-files-to-google-sheets)
- [**Nightly n8n backup to Google Drive** 25 steps · Google Drive](https://millionrounds.com/workflow/nightly-n8n-backup-to-google-drive)
- [**Automate document ingestion & RAG system with Google Drive** 24 steps · calls a model · Google Drive, Google Sheets](https://millionrounds.com/workflow/automate-document-ingestion-and-rag-system-with-google-drive)
- [**Chat with Ollama and Supabase Vector DB** 26 steps · calls a model · Google Drive, Supabase](https://millionrounds.com/workflow/chat-with-ollama-and-supabase-vector-db)
- [**Crawl documentation sites and build an AI knowledge base** 26 steps · calls a model · Google Docs, Google Drive](https://millionrounds.com/workflow/crawl-documentation-sites-and-build-an-ai-knowledge-base)
