Automation library · Documents and files

Document RAG & chat agent: Google Drive to Qdrant with Mistral

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

LargeCalls a model: Mistral, OpenAIRetrieval

25 stepsLarge: read it before trusting it with anything live
1Branch: places the flow splits
1Loop or waits
2Services it connects to

The flow

Starts it 2Model 12Logic 6Service 5

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

  1. 1Embeddings OpenAI1Embeddings Open AiModel
  2. 2OpenAI Chat Model1Lm Chat Open AiModel
  3. 3Web Search Tool Http RequestModel
  4. 4Simple Memory1Memory Buffer WindowModel
  5. 5When chat message receivedChat triggerStarts it
  6. 6Character Text SplitterText Splitter Character Text SplitterModel
  7. 7When clicking ‘Test workflow’Manual triggerStarts it
  8. 8Embeddings OpenAIEmbeddings Open AiModel
  9. 9Mistral Cloud Chat ModelLm Chat Mistral CloudModel
  10. 10Qdrant Vector StoreVector Store QdrantModel
  11. 11ai chat agentAgentModel
  12. 12Default Data LoaderDocument Default Data LoaderModel
  13. 13Google DriveGoogle DriveService
  14. 14Qdrant Vector Store1Vector Store QdrantModel
  15. 15based file name it assign differ metadataInformation ExtractorModel
  16. 16Loop Over each file in gdrive folderSplit In BatchesLogic
  17. 17set all metadataSetLogic
  18. 18add metadataSetLogic
  19. 19clean outputCodeLogic
  20. 20Google Drive1Google DriveService
  21. 21convert data into smaller chunksCodeLogic
  22. 22Mistral UploadHttp RequestService
  23. 23Mistral Signed URLHttp RequestService
  24. 24Mistral DOC OCRHttp RequestService
  25. 25If NODEIfLogic

How it's built

Starts on
Someone opening a chat with it
Steps
25, with 1 branch, 1 loop or waits
Size
Large: read it before trusting it with anything live
Connects to
Google Drive, Qdrant
Model
Mistral, 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 Mistral 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 Mistral 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.