# Build a multi-agent system with Qdrant and Gmail: n8n workflow

> Started by someone opening a chat with it, and works across Gmail, Google Drive and Qdrant.

Source: https://millionrounds.com/workflow/build-a-multi-agent-system-with-qdrant-and-gmail (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [AI assistants](https://millionrounds.com/workflows?category=AI+assistants#library)

# Build a multi-agent system with Qdrant and Gmail

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

Large Calls a model: OpenAI, OpenRouter Retrieval

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fbuild-a-multi-agent-system-with-qdrant-and-gmail)

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

**0** Branches: places the flow splits

**0** Loops or waits

**3** Services it connects to

## The flow

Starts it 2 Model 12 Logic 2 Service 7

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

- 1 **Summarize Document** Tool Workflow *Model*
- 2 **Receive Summary Request** Execute Workflow trigger *Starts it*
- 3 **Generate Summary** Lm Chat Open Ai *Model*
- 4 **Generate Embeddings** Embeddings Open Ai *Model*
- 5 **Get multiple messages in Gmail** Gmail Tool *Service*
- 6 **Read a message in Gmail** Gmail Tool *Service*
- 7 **Send a message in Gmail** Gmail Tool *Service*
- 8 **Create a draft in Gmail** Gmail Tool *Service*
- 9 **Generate Agent Response** Lm Chat Open Ai *Model*
- 10 **Store Conversation with an Agent** Memory Buffer Window *Model*
- 11 **Generate RAG sub-agent Response** Lm Chat Open Ai *Model*
- 12 **Check News or Recent Data** Http Request Tool *Service*
- 13 **Generate Gmail sub-agent Response** Lm Chat Open Router *Model*
- 14 **Chat with an Agent** Chat trigger *Starts it*
- 15 **RAG sub-agent** Agent Tool *Model*
- 16 **Get Document** Google Drive *Service*
- 17 **Process Request** Chain Llm *Model*
- 18 **Search Documents** Vector Store Qdrant *Model*
- 19 **Gmail sub-agent** Agent Tool *Model*
- 20 **Answer Questions** Agent *Model*
- 21 **Extract Content** Extract From File *Service*
- 22 **Format Summary Output** Set *Logic*
- 23 **Convert to Markdown** Markdown *Logic*

## How it's built

- **Starts on:** Someone opening a chat with it
- **Steps:** 23
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Gmail, Google Drive, Qdrant
- **Model:** OpenAI, OpenRouter
- **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 Gmail, Google Drive and Qdrant accounts, and a key for OpenAI and OpenRouter. 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 OpenAI and OpenRouter. 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 23 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 23 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%2Fbuild-a-multi-agent-system-with-qdrant-and-gmail)
- **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.

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

## Workflows like it

Also ai assistants, with the same services where possible, closest in size first.

- [**Build a product catalog chatbot with Mistral and Google Drive** 23 steps · calls a model · Google Drive, Supabase vectors](https://millionrounds.com/workflow/build-a-product-catalog-chatbot-with-mistral-and-google-driv)
- [**Filter AI slop from your LinkedIn feed** 23 steps · calls a model · Qdrant](https://millionrounds.com/workflow/filter-ai-slop-from-your-linkedin-feed)
- [**Generate professional product images | AI marketing campaign** 23 steps · calls a model · Google Drive](https://millionrounds.com/workflow/generate-professional-product-images-ai-marketing-campaign)
- [**Update Amazon transaction memos in YNAB with Gmail** 23 steps · calls a model · Gmail](https://millionrounds.com/workflow/update-amazon-transaction-memos-in-ynab-with-gmail)
- [**Website chatbot with Google Drive and OpenAI** 23 steps · calls a model · Google Drive, Qdrant](https://millionrounds.com/workflow/website-chatbot-with-google-drive-and-openai)
- [**AI-powered multi-channel customer journey with SMS and OpenAI** 24 steps · calls a model · Gmail, Twilio](https://millionrounds.com/workflow/ai-powered-multi-channel-customer-journey-with-sms-and-opena)
