# Build a RAG system with Qdrant and Gemini: n8n workflow

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

Source: https://millionrounds.com/workflow/build-a-rag-system-with-qdrant-and-gemini (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 RAG system with Qdrant and Gemini

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

Large Calls a model: Gemini, OpenAI Retrieval

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

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

**0** Branches: places the flow splits

**2** Loops or waits

**2** Services it connects to

## The flow

Starts it 2 Model 11 Logic 7 Service 4

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

- 1 **When clicking ‘Test workflow’** Manual trigger *Starts it*
- 2 **Embeddings OpenAI1** Embeddings Open Ai *Model*
- 3 **Create collection** Http Request *Service*
- 4 **Recursive Character Text Splitter** Text Splitter Recursive Character Text Splitter *Model*
- 5 **When chat message received** Chat trigger *Starts it*
- 6 **Google Gemini Chat Model** Lm Chat Google Gemini *Model*
- 7 **Embeddings OpenAI** Embeddings Open Ai *Model*
- 8 **Embeddings OpenAI4** Embeddings Open Ai *Model*
- 9 **Clear collection** Http Request *Service*
- 10 **Qdrant Vector Store** Vector Store Qdrant *Model*
- 11 **Default Data Loader1** Document Default Data Loader *Model*
- 12 **chatInput** Set *Logic*
- 13 **Question and Answer Chain** Chain Retrieval Qa *Model*
- 14 **Qdrant Vector Store1** Vector Store Qdrant *Model*
- 15 **Retrive sources** Vector Store Qdrant *Model*
- 16 **Get folder** Google Drive *Service*
- 17 **Wait** Wait *Logic*
- 18 **Merge1** Merge *Logic*
- 19 **Vector Store Retriever** Retriever Vector Store *Model*
- 20 **Aggregate** Aggregate *Logic*
- 21 **Loop Over Items** Split In Batches *Logic*
- 22 **Response** Code *Logic*
- 23 **Get file** Google Drive *Service*
- 24 **Output** Set *Logic*

## How it's built

- **Starts on:** Someone opening a chat with it
- **Steps:** 24, 2 loops or waits
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Google Drive, Qdrant
- **Model:** Gemini, 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 Gemini 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 Gemini 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 24 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 24 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-rag-system-with-qdrant-and-gemini)
- **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 ai assistants, with the same services where possible, closest in size first.

- [**Build and update RAG system with Google Drive and Qdrant** 24 steps · calls a model · Google Drive, Qdrant](https://millionrounds.com/workflow/build-and-update-rag-system-with-google-drive-and-qdrant)
- [**Generate quiet luxury lifestyle product images with OpenAI** 24 steps · calls a model · Google Drive](https://millionrounds.com/workflow/generate-quiet-luxury-lifestyle-product-images-with-openai)
- [**Recipe recommendations with Qdrant and Mistral** 24 steps · calls a model · Qdrant](https://millionrounds.com/workflow/recipe-recommendations-with-qdrant-and-mistral)
- [**AI inbox assistant with OpenAI and Gmail** 25 steps · calls a model · Gmail, Google Drive](https://millionrounds.com/workflow/ai-inbox-assistant-with-openai-and-gmail)
- [**Automating WhatsApp replies with Go High Level and Redis** 25 steps · calls a model · Google Drive, Redis](https://millionrounds.com/workflow/automating-whatsapp-replies-with-go-high-level-and-redis)
- [**Build a multi-agent system with Qdrant and Gmail** 23 steps · calls a model · Gmail, Google Drive](https://millionrounds.com/workflow/build-a-multi-agent-system-with-qdrant-and-gmail)
