Automation library · AI assistants

Create an all-in-one Discord assistant with Gemini and Llama

Started by another system calling it. It calls services over plain HTTP rather than through connectors. It puts Gemini and OpenRouter behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 36 steps, 3 branches: large, and worth reading before you trust it with anything live.

LargeCalls a model: Gemini, OpenRouterRetrieval

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

The flow

Starts it 5Model 11Logic 16Service 4

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

  1. 1WebhookWebhookStarts it
  2. 2Simple MemoryMemory Buffer WindowModel
  3. 3Google Gemini Chat Model1Lm Chat Google GeminiModel
  4. 4Simple Memory1Memory Buffer WindowModel
  5. 5Simple Memory2Memory Buffer WindowModel
  6. 6Google Gemini Chat ModelLm Chat Google GeminiModel
  7. 7OpenRouter Chat ModelLm Chat Open RouterModel
  8. 8Google Gemini Chat Model2Lm Chat Google GeminiModel
  9. 9Has AtcIfLogic
  10. 10Discord AI Response AgentAgentModel
  11. 11AI Agent - Create Image From PromptAgentModel
  12. 12Discord AI Response Agent1AgentModel
  13. 13Discord AI Response Agent2AgentModel
  14. 14Code1CodeLogic
  15. 15IfIfLogic
  16. 16correctNamingCodeLogic
  17. 17Code - Clean JsonCodeLogic
  18. 18correctNaming1CodeLogic
  19. 19correctNaming3CodeLogic
  20. 20If1IfLogic
  21. 21CodeCodeLogic
  22. 22Respond to WebhookRespond To WebhookStarts it
  23. 23Code - Get PromptCodeLogic
  24. 24Respond to Webhook3Respond To WebhookStarts it
  25. 25Respond to Webhook4Respond To WebhookStarts it
  26. 26HTTP RequestHttp RequestService
  27. 27HTTP Request1Http RequestService
  28. 28Fields - Set ValuesSetLogic
  29. 29Code - Set FilenameCodeLogic
  30. 30correctNaming2CodeLogic
  31. 31Create ImageHttp RequestService
  32. 32Error HandlerCodeLogic
  33. 33Handle ResponsCodeLogic
  34. 34Change Link To Be SortHttp RequestService
  35. 35Format Discord ResponseCodeLogic
  36. 36Respond to Webhook2Respond To WebhookStarts it

How it's built

Starts on
Another system calling it
Steps
36, with 3 branches
Size
Large: read it before trusting it with anything live
Connects to
Nothing by connector; it calls services over plain HTTP
Model
Gemini, OpenRouter
Retrieval
Answers are drawn from documents you supply, not from the model alone

Questions

What does it need to run?

An n8n account, and a key for Gemini and OpenRouter. You connect your own accounts after importing it; none are included.

What starts it?

It starts on another system calling it.

Does it use AI?

Yes. It calls Gemini and OpenRouter. 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 36 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 36 steps before you point it at anything that matters.