# Agents with OpenRouter and Telegram: n8n workflow template

> Started by an incoming Telegram message, and works across Telegram. It puts OpenRouter behind a retrieval step, so answers are drawn from documents you...

Source: https://millionrounds.com/workflow/agents-with-openrouter-and-telegram (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Chat assistants](https://millionrounds.com/workflows?category=Chat+assistants#library)

# 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.

Large Calls a model: OpenRouter Retrieval

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fagents-with-openrouter-and-telegram)

**24 steps** Large: read it before trusting it with anything live

**0** Branches: places the flow splits

**0** Loops or waits

**1** Service it connects to

## The flow

Starts it 3 Model 9 Logic 4 Service 8

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

- 1 **Telegram Trigger** Telegram trigger *Starts it*
- 2 **Telegram Trigger1** Telegram trigger *Starts it*
- 3 **Telegram Trigger2** Telegram trigger *Starts it*
- 4 **Postgres Chat Memory** Memory Postgres Chat *Model*
- 5 **GPT 4.1 mini** Lm Chat Open Router *Model*
- 6 **GPT 4.1 mini1** Lm Chat Open Router *Model*
- 7 **GPT 4.1 mini2** Lm Chat Open Router *Model*
- 8 **Zep** Memory Zep *Model*
- 9 **Simple Memory** Memory Buffer Window *Model*
- 10 **AI Agent** Agent *Model*
- 11 **Context Window** Http Request *Service*
- 12 **User Graph** Http Request *Service*
- 13 **User Graph1** Http Request *Service*
- 14 **AI Agent 3** Agent *Model*
- 15 **AI Agent 2** Agent *Model*
- 16 **Send a text message** Telegram *Service*
- 17 **Code1** Code *Logic*
- 18 **Code** Code *Logic*
- 19 **Code2** Code *Logic*
- 20 **Add Memory1** Http Request *Service*
- 21 **Add Memory** Http Request *Service*
- 22 **Merge** Merge *Logic*
- 23 **Send a text message2** Telegram *Service*
- 24 **Send a text message1** Telegram *Service*

## 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.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fagents-with-openrouter-and-telegram)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Connects to

Each opens the other workflows that use it.

[Telegram](https://millionrounds.com/workflows?service=Telegram#library)

## Workflows like it

Also chat assistants, with the same services where possible, closest in size first.

- [**Compare products and generate visual scorecards in Telegram** 24 steps · calls a model · Google Sheets, Telegram](https://millionrounds.com/workflow/compare-products-and-generate-visual-scorecards-in-telegram)
- [**Create branded LinkedIn carousels with OpenAI** 24 steps · calls a model · Telegram](https://millionrounds.com/workflow/create-branded-linkedin-carousels-with-openai)
- [**Generate Images on Telegram from Text and Voice** 24 steps · calls a model · FTP, Telegram](https://millionrounds.com/workflow/generate-images-on-telegram-from-text-and-voice)
- [**Manage employee offboarding checklists with DeepSeek** 24 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/manage-employee-offboarding-checklists-with-deepseek)
- [**Provide Telegram astrology readings with Supabase** 24 steps · calls a model · Google Drive, Supabase](https://millionrounds.com/workflow/provide-telegram-astrology-readings-with-supabase)
- [**Reply to Facebook and Instagram comments with Groq** 24 steps · calls a model · Google Sheets, Telegram](https://millionrounds.com/workflow/reply-to-facebook-and-instagram-comments-with-groq)
