Automation library · Research and reporting

Document analysis & chatbot creation with Llama and Gemini

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

LargeCalls a model: GeminiRetrieval

33 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 19Logic 6Service 6

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

  1. 1On form submission4Form triggerStarts it
  2. 2Google Gemini Chat Model5Lm Chat Google GeminiModel
  3. 3Google Gemini Chat Model6Lm Chat Google GeminiModel
  4. 4Google Gemini Chat ModelLm Chat Google GeminiModel
  5. 5Google Gemini Chat Model1Lm Chat Google GeminiModel
  6. 6Embeddings Mistral CloudEmbeddings Mistral CloudModel
  7. 7Recursive Character Text SplitterText Splitter Recursive Character Text SplitterModel
  8. 8When chat message receivedChat triggerStarts it
  9. 9Google Gemini Chat Model2Lm Chat Google GeminiModel
  10. 10Embeddings Mistral Cloud1Embeddings Mistral CloudModel
  11. 11Google Gemini Chat Model3Lm Chat Google GeminiModel
  12. 12split the binary itemCodeLogic
  13. 13Translator AgentAgentModel
  14. 14Analyzer AgentAgentModel
  15. 15AI AgentAgentModel
  16. 16Information ExtractorInformation ExtractorModel
  17. 17Pinecone Vector StoreVector Store PineconeModel
  18. 18Default Data LoaderDocument Default Data LoaderModel
  19. 19Question and Answer ChainChain Retrieval QaModel
  20. 20Pinecone Vector Store1Vector Store PineconeModel
  21. 21AI Agent1AgentModel
  22. 22Loop Over Items1Split In BatchesLogic
  23. 23Convert to File4Convert To FileService
  24. 24MarkdownMarkdownLogic
  25. 25Vector Store RetrieverRetriever Vector StoreModel
  26. 26Aggregate1AggregateLogic
  27. 27Parsing the documentHttp RequestService
  28. 28CodeCodeLogic
  29. 29Check the parsing statusHttp RequestService
  30. 30Convert to FileConvert To FileService
  31. 31If2IfLogic
  32. 32GmailGmailService
  33. 33Provide the markdownHttp RequestService

How it's built

Starts on
Someone opening a chat with it
Steps
33, with 1 branch, 1 loop or waits
Size
Large: read it before trusting it with anything live
Connects to
Gmail, Pinecone
Model
Gemini
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 Gmail and Pinecone accounts, 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. 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 33 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 33 steps before you point it at anything that matters.