Automation library · AI assistants

Build a self-updating RAG system with OpenAI and Qdrant

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. 25 steps, 2 loops or waits: large, and worth reading before you trust it with anything live.

LargeCalls a model: Gemini, OpenAIRetrieval

25 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 3Model 13Logic 3Service 6

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. 3Recursive Character Text SplitterText Splitter Recursive Character Text SplitterModel
  4. 4Embeddings OpenAI2Embeddings Open AiModel
  5. 5Recursive Character Text Splitter1Text Splitter Recursive Character Text SplitterModel
  6. 6When chat message receivedChat triggerStarts it
  7. 7Google Gemini Chat ModelLm Chat Google GeminiModel
  8. 8Embeddings OpenAIEmbeddings Open AiModel
  9. 9Update?Google Drive triggerStarts it
  10. 10Create collectionHttp RequestService
  11. 11Clear collectionHttp RequestService
  12. 12Insert fileVector Store QdrantModel
  13. 13Default Data Loader1Document Default Data LoaderModel
  14. 14Update fileVector Store QdrantModel
  15. 15Default Data LoaderDocument Default Data LoaderModel
  16. 16Question and Answer ChainChain Retrieval QaModel
  17. 17Qdrant Vector Store1Vector Store QdrantModel
  18. 18Set file_idSetLogic
  19. 19Search filesGoogle DriveService
  20. 20Wait 5 sec.WaitLogic
  21. 21Vector Store RetrieverRetriever Vector StoreModel
  22. 22Delete points by file_idHttp RequestService
  23. 23Get fileGoogle DriveService
  24. 24Loop Over ItemsSplit In BatchesLogic
  25. 25Get filesGoogle DriveService

How it's built

Starts on
Someone opening a chat with it
Steps
25, 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 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.