Automation library · Documents and files

Build document RAG system with Kimi-K2 and Gemini

Started by someone opening a chat with it. It calls services over plain HTTP rather than through connectors. It hands the judgement calls to Gemini. 25 steps, 1 loop or waits: large, and worth reading before you trust it with anything live.

LargeCalls a model: Gemini

25 stepsLarge: read it before trusting it with anything live
0Branches: places the flow splits
1Loop or waits
0Services by connector: it calls them over plain HTTP

The flow

Starts it 4Model 4Logic 7Service 10

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

  1. 1When clicking ‘Execute workflow’Manual triggerStarts it
  2. 2Create CollectionQdrantService
  3. 3When chat message receivedChat triggerStarts it
  4. 4Subworkflow TriggerExecute Workflow triggerStarts it
  5. 5Google Gemini Chat Model1Lm Chat Google GeminiModel
  6. 6Highway Code Manual1Tool WorkflowModel
  7. 7Highway Code ManualTool WorkflowModel
  8. 8Test QuestionsSetLogic
  9. 9Download Large DocumentHttp RequestService
  10. 10Create Summary IndexQdrantService
  11. 11Highway Code ExpertAgentModel
  12. 12Retrieval Vectors with Gemini-Embeddings-001Http RequestService
  13. 13Highway Code MCP ServerMcp triggerStarts it
  14. 14Split OutSplit OutLogic
  15. 15Extract from FileExtract From FileService
  16. 16Query Docs from Qdrant Vector StoreQdrantService
  17. 17Call Highway Code Manual ToolExecute WorkflowLogic
  18. 18Split PagesSplit OutLogic
  19. 19Kimi-K2 via Featherless aiFeatherlessService
  20. 20Kimi-K2 via Featherless.aiFeatherlessService
  21. 21Get ResponseSetLogic
  22. 22Loop Over ItemsSplit In BatchesLogic
  23. 23Chunk RefNo OpLogic
  24. 24Retrieval Vectors with Gemini Embeddings 001Http RequestService
  25. 25Add Docs To Qdrant Vector StoreQdrantService

How it's built

Starts on
Someone opening a chat with it
Steps
25, 1 loop or waits
Size
Large: read it before trusting it with anything live
Connects to
Nothing by connector; it calls services over plain HTTP
Model
Gemini

Questions

What does it need to run?

An n8n account, and a key for Gemini. 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. 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.