n8n + Telegram Integration: Build Powerful Bots Without Code
The n8n Telegram integration is one of the most versatile ways to add real-time messaging to your automation stack. Telegram's Bot API is generous — free, fast, and capable of handling rich media, inline keyboards, group chats, and channels — and when you pair it with n8n's workflow engine, you get a bot-building platform that rivals custom-coded solutions without writing a single line of code.
Whether you need server alerts piped to your phone, a customer-facing support bot, or an internal team command center, n8n's Telegram Trigger and Telegram nodes handle it all. Let's build some real workflows.
Why Telegram + n8n Is a Powerful Combination
Telegram stands apart from other messaging platforms for automation. The Bot API has no per-message fees, supports messages up to 4,096 characters, handles photos, documents, videos, and location data, and works across every device. Bots can manage group chats, channels, and private conversations simultaneously.
n8n connects to Telegram through two dedicated nodes:
- Telegram Trigger node — listens for incoming messages, commands, callback queries, and other bot events via webhooks
- Telegram node — sends messages, photos, documents, edits messages, pins content, and manages chat settings
This two-node system means your workflows can both react to what users send and push information proactively. Combined with n8n's 400+ other integrations, your Telegram bot becomes a front-end for your entire tool stack — from databases and CRMs to APIs and AI models.
Setting Up Your Telegram Bot with BotFather
Before connecting n8n, you need a Telegram bot token. Here's the quick setup:
- Open Telegram and search for @BotFather
- Send
/newbotand follow the prompts to choose a name and username - BotFather returns an HTTP API token — copy this immediately
- Optionally, send
/setdescriptionand/setabouttextto configure your bot's profile - Send
/setcommandsto define the command menu users see when they type/
Your bot token looks something like 7123456789:AAH-someRandomStringHere. Keep it secret — anyone with this token can control your bot.
Tip: If you're building a bot that will operate in groups, send /setprivacy to BotFather and disable privacy mode. Otherwise, your bot only receives messages that start with / or directly mention it.
Connecting n8n to Your Telegram Bot
In your n8n instance, the setup takes about two minutes:
- Open your n8n editor and add a Telegram Trigger node to the canvas
- Click Create New Credential and paste your bot token into the Access Token field
- Under Updates, select the event types you want to listen for —
message,callback_query,edited_message, orchannel_post - Activate the workflow — n8n automatically registers a webhook with Telegram's API
For sending messages, add a Telegram node anywhere in your workflow. It uses the same credential and supports these operations: Send Message, Send Photo, Send Document, Send Video, Send Sticker, Edit Message Text, Pin Chat Message, Delete Message, and more.
The Chat ID field determines where messages go. For private chats, this is the user's numeric ID (available in the Telegram Trigger output as message.chat.id). For groups and channels, it's a negative number or the @channelname handle.
If you're running your n8n instance on n8nautomation.cloud, webhooks work out of the box — your dedicated instance has a public URL with SSL, which Telegram requires. Self-hosted setups often need reverse proxy configuration to get webhooks running reliably.
5 Telegram Notification Workflows You Can Build Today
These are practical, production-tested patterns using n8n's Telegram node alongside other integrations:
1. Server and uptime monitoring alerts
Use an HTTP Request node on a Schedule Trigger (every 5 minutes) to ping your critical endpoints. Route through an IF node to check for non-200 status codes. On failure, the Telegram node sends an alert with the endpoint URL, status code, and timestamp. Add a Function node to suppress duplicate alerts if the same endpoint was already reported within the last hour.
2. E-commerce order notifications
Connect a Webhook node to your Shopify, WooCommerce, or Stripe webhook. When a new order arrives, format the customer name, order total, and items into a clean Telegram message. Use Telegram's HTML parse mode to bold the order number and italicize the product names for readability.
3. GitHub deployment and CI/CD updates
Use n8n's GitHub Trigger node to listen for deployment_status, push, or pull_request events. The Telegram node sends a formatted summary to your team's dev channel — including the commit message, author, branch, and a direct link to the PR or deployment.
4. Daily digest from multiple sources
A Schedule Trigger fires at 8 AM. Parallel branches fetch data from Google Sheets (sales numbers), a database (support ticket count), and an API (active users). A Merge node combines everything, and a Function node formats a clean daily summary. One Telegram message gives your team the full picture.
5. Form submission and lead alerts
Connect a webhook to your website's contact form or Typeform. When someone submits, the workflow enriches the lead data (company info via an API lookup), stores it in your CRM, and sends a Telegram notification to your sales channel with the lead's name, email, company, and the message they sent.
Building Interactive Bot Commands in n8n
Notification bots push information out. Interactive bots let users pull information in — and this is where n8n's Telegram integration really shines.
The Telegram Trigger node outputs the full message object, including message.text. Use a Switch node to route based on the command:
/status→ queries your database and returns system health/orders→ fetches recent orders from your e-commerce API/ticket 1234→ looks up a specific support ticket/report→ generates and sends a PDF or CSV file
For the /ticket example, use a Function node to extract the ticket number from the message text with message.text.split(' ')[1], then pass it to an HTTP Request node that queries your ticketing system. Format the response and send it back to the same chat ID.
You can also use inline keyboards — buttons that appear below messages. In the Telegram node, set the Reply Markup to Inline Keyboard and define buttons with callback data. When a user taps a button, the Telegram Trigger fires a callback_query event with the button's data, letting you branch into different workflow paths.
This pattern is perfect for approval workflows: a request comes in, the bot sends a message with "Approve" and "Reject" buttons, and the callback triggers the appropriate action — updating a database, sending an email, or posting to another channel.
Advanced Patterns: Media, Groups, and Inline Keyboards
Sending files and images dynamically
The Telegram node's Send Photo and Send Document operations accept binary data from previous nodes. This means you can generate charts with an HTTP Request to a chart API, create PDFs with a document generation service, or pull files from cloud storage — and send them directly through your bot. Use the Send Photo operation with a caption to add context below the image.
Managing group conversations
Bots in Telegram groups can moderate, summarize, and automate. The Trigger node captures all group messages (with privacy mode disabled), so you can build workflows that summarize daily conversations using an AI node, auto-delete messages containing specific keywords, or maintain a FAQ bot that responds to common questions.
Channel broadcasting
Add your bot as an admin to a Telegram channel, and it can post on a schedule. Combine this with RSS feeds, social media APIs, or content databases to auto-publish curated content. The Schedule Trigger plus an RSS Feed Read node plus Telegram makes a fully automated content channel in three nodes.
Multi-step conversations with workflow state
For bots that need to remember context across messages — like a multi-step form — use n8n's built-in workflow static data or an external database. Store the user's chat ID and current step, then check it on each incoming message to determine which question to ask next. This turns a simple bot into a conversational interface.
Production Best Practices for Telegram Bots
Building a bot that works in testing is easy. Building one that runs reliably in production requires a few more considerations:
Use error handling on every workflow. Add an Error Trigger node that sends a Telegram message to your admin chat when any workflow fails. This creates a self-monitoring system — your Telegram bot tells you when your Telegram bot breaks.
Validate incoming data. Not every message will match your expected format. Add IF nodes to check that required fields exist before processing. Handle cases where users send photos when you expect text, or send garbled commands.
Separate concerns into multiple workflows. Don't build one massive workflow that handles every command and event type. Create individual workflows for each major function — one for notifications, one for interactive commands, one for group management. This makes debugging and updating far simpler.
Use HTML parse mode for rich messages. Telegram supports <b>, <i>, <code>, <pre>, and <a href="..."> tags in messages. Set the Parse Mode to HTML in the Telegram node for clean, readable output. Avoid Markdown parse mode — it has quirks with special characters that cause silent failures.
Keep your instance always-on. Telegram delivers webhook events in real-time, but if your n8n instance is down, those events are lost after Telegram's retry window. Running on n8nautomation.cloud means your dedicated instance stays up with automatic restarts and monitoring, so your bot never misses a message. You also get automatic backups in case you need to restore a workflow.
Test with a staging bot. Create a second bot via BotFather for development and testing. Point it at your test workflows so you can iterate without disrupting your production bot's users.
Telegram bots built on n8n hit a sweet spot — they're visual enough to build quickly, powerful enough to handle real workloads, and flexible enough to integrate with whatever tools your team already uses. Start with a simple notification workflow, get comfortable with the nodes, then layer in interactivity as your needs grow.