n8nTelegramAutomationBotsWorkflow

How to Build a Telegram Notification Bot with n8n

Tariq OsmaniTariq Osmani8 min read
How to Build a Telegram Notification Bot with n8n

Your CRM sends a hot lead at 9:40 PM. The email lands in a filtered folder nobody checks. By morning, a competitor has replied. That gap is exactly what Telegram notification bots close: alerts that push straight to the phone in your pocket, not to an inbox you've learned to ignore.

Telegram is a strong channel for business alerts because there's no app to build and no app-store review. The Bot API is free, bots work in private chats, groups, and channels, and notifications arrive on phone, desktop, and web simultaneously. One workflow in n8n turns any event into a push message to you, your team, or an entire channel.

This n8n Telegram bot tutorial takes you from an empty n8n instance to a working notification bot in about fifteen minutes. No code required — just the same pattern I use to ship production alerts for clients.

What You'll Need

PieceWhat it isWhat it does
n8nAutomation platformRuns the workflow and the trigger
Telegram accountFree messaging accountReceives the alerts
BotFatherTelegram's official bot managerCreates your bot and issues the API token

That's the whole list. No server, no mobile app, no paid tools. A self-hosted or cloud n8n instance both work; the steps are identical. If you haven't picked an automation platform yet, n8n vs Zapier vs Make explains why n8n is the right default for anything that touches your own infrastructure.

Step 1: Create Your Telegram Bot with BotFather

Every Telegram bot is created through @BotFather, Telegram's official bot that manages other bots. This is where you get the access token n8n will use.

  1. Open Telegram and search for @BotFather (the verified account).
  2. Send /start, then send /newbot.
  3. Choose a display name, like "Acme Alerts".
  4. Choose a username that must end in "bot", like acme_alerts_bot. Telegram tells you if the username is taken.
  5. BotFather replies with an HTTP API token that looks like 123456789:ABC-DEF.... Copy it somewhere safe.

That token is your bot's password, so keep it out of chats and repos. You can always come back and send /mybots to BotFather to view or reset it. Also open a chat with your new bot and send it any message, like hi — you'll need that for the next step.

Step 2: How to Get Your Telegram Chat ID

Telegram sends messages to a chat, not to the bot itself. Every chat — private, group, or channel — has a numeric ID, and your bot needs to know where to deliver. The quickest way to read yours takes about twenty seconds.

Open your browser and paste this, replacing YOUR_TOKEN:

https://api.telegram.org/botYOUR_TOKEN/getUpdates

Because you messaged your bot in Step 1, the response is JSON that includes your chat:

{"ok": true, "result": [{"message": {"chat": {"id": 123456789}}}]}

That id value is your chat ID. Note that group and channel IDs are negative — keep the minus sign when you copy them. An alternative to the browser is the n8n Telegram node's Get Updates operation, which returns the same data inside your workflow, but the URL method is fine for a one-time lookup.

A team collaborating around a laptop as a Telegram alert arrives, the same way this bot keeps you and your team in the loop

Step 3: Set Up the n8n Workflow

Open n8n and create a new workflow.

  1. Add a Telegram node to the canvas.
  2. Open its credential settings and click Create new credential.
  3. Choose the Telegram API credential type (labeled "Bot" on some n8n versions).
  4. Paste your token into the Access Token field. There's also a Test Chat ID field — put your chat ID there while you're testing so messages don't hit the wrong inbox.
  5. On the node itself, set Resource to Message, Operation to Send Message, and paste your chat ID into Chat ID.

To prove the wiring works before adding a trigger, attach a Manual Trigger to the Telegram node and click Execute Workflow. Within a second or two you should get a message from your bot. That message is the entire point of the n8n Telegram bot tutorial compressed into one click — the trigger is the only thing left.

Want this built for your business instead?

I map one or two of your processes in a free audit and tell you honestly whether automation pays off yet.

Step 4: Configure the Trigger

A Telegram node on its own does nothing. It needs a trigger upstream to fire it. Two triggers cover almost every notification use case:

TriggerBest forExample
Schedule (Cron)Time-based alertsDaily 9:00 AM sales summary
WebhookEvent-driven alertsNew form submission, payment, error

For a first bot, the Schedule trigger is the simplest because it doesn't need a publicly reachable URL. Add a Schedule node, pick the Days Interval or Cron Expression option, set it to fire once a day (or every few minutes while testing), and connect it to your Telegram node. When you hit Execute, the bot sends your test message.

The Webhook node is the better choice once you want alerts driven by real events — a lead form submission, a Stripe payment, a monitoring alert. n8n gives you a webhook URL like https://your-n8n.example.com/webhook/xyz, and whatever system you point at it triggers the workflow. That requires a publicly reachable n8n URL — free on a hosted instance, but a self-hosted instance behind a firewall needs a tunnel or public ingress first.

Step 5: Test and Activate the Workflow

Now put it in production:

  1. Set the schedule to your real cadence (once a day, or per event).
  2. Run Execute Workflow once with the schedule attached to confirm the full path, schedule-to-Telegram, fires.
  3. Toggle the workflow to Active in the top-right of the n8n editor.
  4. Check the Executions tab after a cycle or two to confirm runs are succeeding.

If a run fails, the execution log shows the exact node and error — usually a bad token, a wrong chat ID, or an expired webhook URL. Fix it, re-run, done.

Practical Tips: Expressions and Error Handling

Two things separate a toy from an alert you can rely on.

Use expressions for dynamic messages. The Telegram node accepts n8n expressions, so you can interpolate values from the trigger's data:

New order {{ $json.orderId }} from {{ $json.customer }} at {{ $now.format('HH:mm') }}

The {{ $json.fieldName }} syntax pulls fields from the node that triggered the workflow, and {{ $now }} gives you the current time with formatting. This is how the same bot goes from "it works" to "it tells you exactly what happened," which is the difference between a notification and an alert you actually act on.

Plan for failure. n8n nodes have an On Error toggle — set the Telegram node to Continue when an error happens, and add an Error Trigger on a separate workflow path that notifies you if the main one breaks. Better still, keep alerting out of the critical path entirely: build one workflow that watches your other workflows and pings you when one of them errors. These are the patterns I use in every production Telegram setup, and they're what turns a passing n8n Telegram bot tutorial into something you can trust overnight.

What's Next

A working notification bot is a foundation, not a finish line. Natural extensions:

  • Log alerts to Google Sheets. Add a Google Sheets node after the Telegram node to record every alert with a timestamp — a cheap audit trail.
  • Wire up CRM and form alerts. Point a Webhook trigger at your contact form and get a Telegram message for every new lead.
  • Add AI to the loop. Feed event data to a Claude node and let it summarize before it hits Telegram, the same pattern as my automated invoice processing workflow.
  • Reuse the trigger. Once you have repetitive tasks identified and ranked by what they cost you per year, Telegram alerting is the delivery layer for almost all of them.

How Smart AI Workspace Approaches This

Smart AI Workspace is founder-led — I build and ship every client project myself — and alerting is the backbone of almost every automation I ship for clients. A workflow that runs silently is one you'll stop checking; the ones that push a message to your phone get maintained, trusted, and extended. The n8n setup above is deliberately minimal because in production, I'd rather have a dozen small, reliable notification bots than one sprawling workflow that does everything.

For client builds now, the alerting stays in n8n but the decision-making moves to a Claude agent — deciding whether an event is worth a notification, what to say, and who to route it to. n8n handles the trigger and the send; the agent handles the judgment. n8n vs Claude Code covers where that line falls, and if you'd rather skip the build entirely, book a free automation audit.

Build It Yourself, or Let Me Build It For You

The fifteen-minute version above is enough to get real alerts running today. If you'd rather skip the setup and get a production workflow that's wired to your forms, CRM, and monitoring — with the error handling included — that's exactly the work I do.

See my services → · Talk to me about your project → · Hire me on Upwork → · Back to the homepage →


Sources: Telegram Bots — BotFather and the Bot API · Telegram Bot API — getUpdates · n8n Telegram Node Documentation · n8n Schedule Trigger Documentation · n8n Webhook Node Documentation

Frequently asked questions

How do I get a Telegram chat ID for n8n?
Message your bot once, then open https://api.telegram.org/botYOUR_TOKEN/getUpdates in a browser, replacing YOUR_TOKEN with your bot token. The JSON response contains a chat object with an id field — that number is your chat ID. Group and channel IDs are negative, so keep the minus sign. The n8n Telegram node's Get Updates operation returns the same data inside a workflow.
How do I set up a webhook trigger for an n8n Telegram bot?
Add a Webhook node as the trigger. n8n gives you a URL like https://your-n8n.example.com/webhook/xyz; point the system that should fire the alert — a form, Stripe, a monitor — at that URL. A hosted n8n instance exposes the URL automatically; a self-hosted instance behind a firewall needs a tunnel or public ingress first.
Why is my n8n Telegram trigger not working?
Check the Executions tab for the failing node and its error. The usual causes are a wrong or expired bot token, an incorrect chat ID (missing the minus sign for groups), a webhook URL that is not publicly reachable, or the workflow left inactive. Fix the specific error shown and re-run.
Do I need to write code to build an n8n Telegram bot?
No. The whole setup uses @BotFather to create the bot and n8n's built-in Telegram, Schedule, and Webhook nodes. The only optional code-like step is n8n expressions, such as inserting an order ID into the message text, and those are written inline in the node.
What can a Telegram notification bot built with n8n do?
It pushes real-time alerts to your phone, a team group, or a channel whenever an event fires — a new lead, a payment, a failed workflow, a daily summary. With n8n expressions the message can include details from the triggering event, turning a generic ping into an alert you can act on immediately.

Want this running in your business?

I build custom AI automation for B2B teams — from the first audit to production. Tell me what's slowing you down and I'll map the fix.

Tariq Osmani

About the author

Tariq Osmani

AI Automation Specialist & Founder, Smart AI Workspace

Anthropic Registered Claude Partner | 11+ Certifications | 8+ Years IT Experience

Tariq builds custom AI agents and agentic automation systems for B2B businesses using Claude API, n8n, and FastAPI. As an Anthropic Registered Claude Partner, he specializes in production-ready automation that delivers real business results.