Automation library · Chat assistants

Agents with OpenRouter and Telegram

Started by an incoming Telegram message, and works across Telegram. It puts OpenRouter behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 24 steps: large, and worth reading before you trust it with anything live.

LargeCalls a model: OpenRouterRetrieval

24 stepsLarge: read it before trusting it with anything live
0Branches: places the flow splits
0Loops or waits
1Service it connects to

The flow

Starts it 3Model 9Logic 4Service 8

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

  1. 1Telegram TriggerTelegram triggerStarts it
  2. 2Telegram Trigger1Telegram triggerStarts it
  3. 3Telegram Trigger2Telegram triggerStarts it
  4. 4Postgres Chat MemoryMemory Postgres ChatModel
  5. 5GPT 4.1 miniLm Chat Open RouterModel
  6. 6GPT 4.1 mini1Lm Chat Open RouterModel
  7. 7GPT 4.1 mini2Lm Chat Open RouterModel
  8. 8ZepMemory ZepModel
  9. 9Simple MemoryMemory Buffer WindowModel
  10. 10AI AgentAgentModel
  11. 11Context WindowHttp RequestService
  12. 12User GraphHttp RequestService
  13. 13User Graph1Http RequestService
  14. 14AI Agent 3AgentModel
  15. 15AI Agent 2AgentModel
  16. 16Send a text messageTelegramService
  17. 17Code1CodeLogic
  18. 18CodeCodeLogic
  19. 19Code2CodeLogic
  20. 20Add Memory1Http RequestService
  21. 21Add MemoryHttp RequestService
  22. 22MergeMergeLogic
  23. 23Send a text message2TelegramService
  24. 24Send a text message1TelegramService

How it's built

Starts on
An incoming Telegram message
Steps
24
Size
Large: read it before trusting it with anything live
Connects to
Telegram
Model
OpenRouter
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 Telegram account, and a key for OpenRouter. You connect your own accounts after importing it; none are included.

What starts it?

It starts on an incoming Telegram message.

Does it use AI?

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