Automation library · Documents and files

Build a PDF Document RAG System with Mistral 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. 29 steps, 3 loops or waits: large, and worth reading before you trust it with anything live.

LargeCalls a model: Gemini, OpenAIRetrieval

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

The flow

Starts it 3Model 11Logic 8Service 7

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

  1. 1When clicking ‘Test workflow’Manual triggerStarts it
  2. 2Embeddings OpenAIEmbeddings Open AiModel
  3. 3Token SplitterText Splitter Token SplitterModel
  4. 4When chat message receivedChat triggerStarts it
  5. 5Google Gemini Chat ModelLm Chat Google GeminiModel
  6. 6Embeddings OpenAI1Embeddings Open AiModel
  7. 7When Executed by Another WorkflowExecute Workflow triggerStarts it
  8. 8Create collectionHttp RequestService
  9. 9Google Gemini Chat Model1Lm Chat Google GeminiModel
  10. 10Refresh collectionHttp RequestService
  11. 11Qdrant Vector StoreVector Store QdrantModel
  12. 12Default Data LoaderDocument Default Data LoaderModel
  13. 13Question and Answer ChainChain Retrieval QaModel
  14. 14Qdrant Vector Store1Vector Store QdrantModel
  15. 15Get PDFGoogle DriveService
  16. 16Summarization ChainChain SummarizationModel
  17. 17Search PDFsGoogle DriveService
  18. 18WaitWaitLogic
  19. 19Vector Store RetrieverRetriever Vector StoreModel
  20. 20Mistral UploadHttp RequestService
  21. 21Set summarySetLogic
  22. 22Loop Over Items1Split In BatchesLogic
  23. 23Loop Over ItemsSplit In BatchesLogic
  24. 24Mistral Signed URLHttp RequestService
  25. 25Edit Fields1SetLogic
  26. 26Set pageSetLogic
  27. 27Mistral DOC OCRHttp RequestService
  28. 28Execute WorkflowExecute WorkflowLogic
  29. 29CodeCodeLogic

How it's built

Starts on
Someone opening a chat with it
Steps
29, 3 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 29 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 29 steps before you point it at anything that matters.