Automation library · AI assistants

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.

LargeCalls a model: Gemini, OpenAIRetrieval

24 stepsLarge: read it before trusting it with anything live
0Branches: places the flow splits
2Loops or waits
2Services it connects to

The flow

Starts it 2Model 11Logic 7Service 4

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

  1. 1When clicking ‘Test workflow’Manual triggerStarts it
  2. 2Embeddings OpenAI1Embeddings Open AiModel
  3. 3Create collectionHttp RequestService
  4. 4Recursive Character Text SplitterText Splitter Recursive Character Text SplitterModel
  5. 5When chat message receivedChat triggerStarts it
  6. 6Google Gemini Chat ModelLm Chat Google GeminiModel
  7. 7Embeddings OpenAIEmbeddings Open AiModel
  8. 8Embeddings OpenAI4Embeddings Open AiModel
  9. 9Clear collectionHttp RequestService
  10. 10Qdrant Vector StoreVector Store QdrantModel
  11. 11Default Data Loader1Document Default Data LoaderModel
  12. 12chatInputSetLogic
  13. 13Question and Answer ChainChain Retrieval QaModel
  14. 14Qdrant Vector Store1Vector Store QdrantModel
  15. 15Retrive sourcesVector Store QdrantModel
  16. 16Get folderGoogle DriveService
  17. 17WaitWaitLogic
  18. 18Merge1MergeLogic
  19. 19Vector Store RetrieverRetriever Vector StoreModel
  20. 20AggregateAggregateLogic
  21. 21Loop Over ItemsSplit In BatchesLogic
  22. 22ResponseCodeLogic
  23. 23Get fileGoogle DriveService
  24. 24OutputSetLogic

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.