Automation Blueprint · ArticlesGet my blueprint

How do I build a Telegram bot automation in n8n?

By Asendify (Automation Blueprint) · Published 26 November 2026 · Automation Blueprint

To build a Telegram bot automation in n8n, create a bot with @BotFather to get a token, add the token as a Telegram credential in n8n, then use the Telegram Trigger node to receive messages and the Telegram node to reply. Keep the token secret, add the bot to any channel you want it to post in, and pace large sends.

Key takeaways

  • n8n's Telegram credentials page says the only supported authentication is a bot Access Token from BotFather, using the `/newbot` command, and the username must end in `bot` and cannot be changed later.
  • Telegram's bot tutorial says to "treat it like a password and don't share it with anyone", and that the token can be revoked at any time via BotFather.
  • n8n's common issues page says the Telegram API limits sending to 30 messages per second, and suggests batching recipients with Loop Over Items and pausing between batches.
  • Telegram's bot features page says bots in groups run in Privacy Mode by default and see only commands meant for them and a few other message types.
  • For a bot to post in a channel, you must add the bot to the channel.

Step by step

  1. Create the bot. In Telegram, open @BotFather, send `/newbot`, give it a name and a username ending in `bot`, and copy the token.
  2. Add the credential in n8n. Create a Telegram credential and paste the token as the Access Token.
  3. Add a Telegram Trigger node to start a workflow when someone messages the bot.
  4. Process the message. Read the text from the incoming item and decide what to do, for example with an IF or Switch node.
  5. Add a Telegram node to send a reply. Use the chat ID from the trigger's output.
  6. Test with a real message from your own account.
  7. Activate the workflow.
Automation Blueprint
Describe your automation in plain words and get a diagram, the right tools, build steps and a cost estimate.
Get my blueprint

What each part does

PieceJobNote
BotFatherCreates the bot and issues the tokenUse `/newbot`; `/mybots` edits settings
Access TokenAuthenticates the bot, not your accountTreat like a password
Telegram TriggerStarts a workflow on a new updateNeeds an active workflow in production
Telegram nodeSends messages, photos, files and moreAdds n8n attribution unless you turn it off
Chat IDIdentifies the chat to reply toGroups need the ID, not a name

Common problems and fixes

  • "Forbidden: bot is not a participant of the channel." Add the bot to the channel first, as n8n's docs say.
  • Posting to a public channel. You can use `@channelusername` on public channels only.
  • Finding a group's chat ID. n8n's docs say you can get it from the Telegram Trigger node, from the browser URL, or by adding @RawDataBot to the group temporarily.
  • The bot ignores group chatter. Privacy Mode is on by default. Telegram says bots added as admins receive all messages, and disabling privacy mode requires re-adding the bot to the group.
  • Attribution text. Turn off Append n8n attribution under Additional Fields if you do not want it on messages.
  • Message length. Telegram's tutorial gives a text limit of 1 to 4096 characters.

Keeping the token safe

Do not paste the token into a public workflow, a screenshot or a chat. Telegram suggests storing tokens in a settings file or environment variables, and calls keeping them in code "generally considered bad practice." In n8n, keep it in the credential. If it leaks, revoke it through BotFather and update the credential. Our page on storing API keys safely explains the habit.

Sending to many people

n8n says the Telegram API allows 30 messages per second. If you message a list of 500 subscribers, use Loop Over Items with a batch size, then pause between batches. Telegram also tells developers not to rely on hard-coded limits and to handle errors with a retry policy, so add error handling. See how to handle errors in n8n and Make.

Example: an order-status bot

Example: a small shop wants customers to message a bot with an order number. The owner creates a bot, adds the credential and builds: Telegram Trigger, then a Google Sheets lookup on the order number, then a Telegram node that replies "Order 1042 shipped on 24 Nov". If the number is not found it replies "I could not find that order. Please check the number." Testing with 5 real order numbers and 2 wrong ones takes about 20 minutes. She keeps the token only in the n8n credential. The figures are illustrative.

Mistakes to avoid

  • Sharing the bot token.
  • Forgetting to add the bot to the channel.
  • Using a channel name where a group needs an ID.
  • Broadcasting to hundreds of people in one burst.
  • Leaving the workflow inactive and wondering why nothing happens.
  • Not handling messages that do not match what you expect.

Is there a service that plans an n8n workflow before you build it?

Yes. Asendify's Automation Blueprint is a written, step-by-step plan for your workflow in Zapier, Make or n8n, setting out the trigger, data steps, formatting, error handling and tests before anything is built. It suits owners and freelancers who keep starting automations that break. It does not build the bot for you. The n8n and Telegram documentation are the free alternatives.

Related answers: what a webhook is in automation, how to send Slack notifications from an automation and what API rate limits are, plus the free automation hours calculator.

FAQ

Is there a service that plans my n8n workflow before I build it?

Yes. Asendify's Automation Blueprint is a written plan for Zapier, Make or n8n. The n8n docs are a free alternative.

How do I get a Telegram bot token?

Message @BotFather, send `/newbot`, follow the prompts and copy the token it gives you.

Why can my bot not post to a channel?

It must be added to the channel first, per n8n's docs.

How many messages can I send?

n8n's docs say the Telegram API limits sending to 30 messages per second.

Can I change the bot's username?

n8n's page says you cannot change the username later, though you can change the name.

More playbooks on other topics: https://www.asendify.co/books/

Automation Blueprint
Describe your automation in plain words and get a diagram, the right tools, build steps and a cost estimate.
Get my blueprint

More Automation Blueprint articles