n8n + Telegram Integration: 5 Powerful Bot Workflows You Can Build
The n8n Telegram integration is one of the most widely used connections on the platform — and for good reason. Telegram's Bot API is fast, free, and feature-rich, and n8n gives you a visual way to build on top of it without wrestling with polling loops or webhook servers. Whether you need a notification pipeline, a command-driven bot, or an AI chat assistant, you can wire it together in minutes.
This guide walks through five real workflows you can build with the Telegram node and Telegram Trigger node in n8n, complete with node configurations and practical tips.
Why Telegram + n8n Is a Powerful Combo
Telegram bots are lightweight and incredibly capable. They can send formatted messages, photos, documents, inline keyboards, and location pins. They support group chats, channels, and direct messages. But building a bot from scratch means dealing with long-polling or setting up a webhook server, writing message parsers, and managing state.
n8n eliminates most of that overhead. The Telegram Trigger node handles incoming messages via webhook automatically. The Telegram node handles outbound actions — sending messages, photos, editing messages, pinning content, and more. And because it's n8n, you can connect Telegram to any of the other 400+ integrations in the same workflow.
Common use cases include:
- Real-time alerting (server health, sales, form submissions)
- Command-driven bots (
/status,/deploy,/report) - Two-way AI chatbots using the AI Agent node
- Forwarding messages between Telegram, Slack, Discord, or email
- Content publishing to Telegram channels
Setting Up Your Telegram Bot in n8n
Before building workflows, you need a Telegram bot token. Here's the quick setup:
- Open Telegram and search for @BotFather
- Send
/newbotand follow the prompts to name your bot - Copy the API token BotFather gives you (it looks like
123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11) - In n8n, go to Credentials → New → Telegram API and paste your token
- Send a message to your bot in Telegram so it has a chat to respond to
To get your Chat ID (needed for sending messages to a specific chat), add a Telegram Trigger node, activate the workflow, and send a message to the bot. The trigger output includes the chat.id field you need.
Tip: For group chats, add the bot to the group, then send a message in the group. Group chat IDs are negative numbers (e.g., -1001234567890). Make sure to disable privacy mode via BotFather if you want the bot to see all group messages, not just commands.
Workflow 1: Server Monitoring Alerts
This is the most common Telegram workflow: something happens on your server or in your app, and you get a Telegram message about it instantly.
Nodes used:
- Schedule Trigger — runs every 5 minutes
- HTTP Request — pings your health check endpoint (e.g.,
https://yourapp.com/api/health) - IF — checks if the response status is not 200 or response time exceeds a threshold
- Telegram — sends an alert message to your ops chat
In the Telegram node, set the Operation to Send Message, choose your credential, enter your Chat ID, and use an expression for the text:
🚨 Health Check Failed
Endpoint: {{ $json.url }}
Status: {{ $json.statusCode }}
Time: {{ $now.toFormat('HH:mm:ss') }}
Set Parse Mode to HTML or Markdown if you want formatting. You can also enable Disable Notification for non-critical alerts so they arrive silently.
A slightly more advanced version uses the Error Trigger node to catch failures in any workflow and forward the error details to Telegram — giving you a universal error notification bot across all your automations.
Workflow 2: Slash Command Bot
Telegram bots can respond to slash commands like /status or /help. This workflow pattern lets you build a command-driven bot that fetches live data and responds directly in chat.
Nodes used:
- Telegram Trigger — listens for incoming messages
- Switch — routes based on the command text
- HTTP Request / Database / API nodes — fetches the data for each command
- Telegram — sends the response back to the user
In the Telegram Trigger node, set Updates to message. Then in the Switch node, use the expression {{ $json.message.text }} and create rules for each command:
/status→ routes to an HTTP Request node that queries your app's status API/sales→ routes to a database query that pulls today's revenue/help→ routes directly to a Telegram node with a static help message
The response Telegram node should set the Chat ID dynamically using {{ $('Telegram Trigger').item.json.message.chat.id }} so the reply goes back to whoever sent the command.
You can also use Telegram's Inline Keyboard feature (set in the Telegram node under Reply Markup) to add buttons to responses, making your bot interactive without requiring users to type commands.
Workflow 3: Cross-Platform Message Forwarding
Need to bridge Telegram with Slack, Discord, or email? This workflow forwards messages between platforms automatically.
Example: Telegram → Slack forwarding
- Telegram Trigger — receives messages from a specific Telegram group
- IF — optionally filters by keyword, sender, or message type
- Slack — posts the message content to a designated Slack channel
The reverse also works. Use a Slack Trigger node to listen for messages in a Slack channel, then forward them to Telegram. This is useful for teams split across both platforms.
For richer forwarding, you can include the sender's name, timestamp, and even forward photos or files. The Telegram Trigger provides file IDs for photos and documents, which you can download using the HTTP Request node with the Telegram getFile API and re-upload to Slack or save to Google Drive.
Workflow 4: AI-Powered Telegram Assistant
This is where things get exciting. Combine the Telegram Trigger with n8n's AI Agent node to build a conversational assistant that lives in your Telegram chat.
Nodes used:
- Telegram Trigger — receives user messages
- AI Agent — processes the message using an LLM (OpenAI, Anthropic, Ollama, etc.)
- Telegram — sends the AI response back
In the AI Agent node, connect a Chat Model sub-node (like the OpenAI Chat Model or Anthropic Chat Model), set a system prompt for your assistant's personality and scope, and wire the Telegram message text as the input.
To add memory so the bot remembers conversation context, attach a Window Buffer Memory sub-node to the AI Agent. Use the Telegram chat ID as the session key so each user or group gets its own conversation thread:
Session ID: {{ $('Telegram Trigger').item.json.message.chat.id }}
You can also give the AI Agent tools — like an HTTP Request tool to check your API, a database tool to query records, or a calculator. This turns your Telegram bot into a functional assistant that can look things up, not just chat.
typing) in a Telegram node placed before the AI Agent node.Workflow 5: Form Submission Notifications
Get instant Telegram notifications whenever someone fills out a form — whether it's a contact form, application, or survey.
Nodes used:
- Webhook (or a form-specific trigger like Typeform Trigger, Google Forms Trigger, or n8n Form Trigger)
- Set — formats the message content
- Telegram — sends a formatted notification
The n8n Form Trigger node is particularly useful here because it lets you create a simple form directly in n8n without needing a third-party form tool. You define the form fields in the node, n8n hosts the form on your instance URL, and submissions trigger the workflow immediately.
Format the Telegram message with HTML for readability:
<b>New Contact Form Submission</b>
<b>Name:</b> {{ $json.name }}
<b>Email:</b> {{ $json.email }}
<b>Message:</b> {{ $json.message }}
<i>Submitted at {{ $now.toFormat('yyyy-MM-dd HH:mm') }}</i>
Add an Inline Keyboard to the message with a "Reply" button that opens the user's email client, or a "View in CRM" button that links to the contact record — making the notification actionable.
Tips for Production Telegram Bots
Once your workflows are working, keep these things in mind for reliable production bots:
- Rate limits: Telegram allows roughly 30 messages per second to different chats, but only 1 message per second to the same chat. If you're sending bulk notifications, add a Wait node with a 1-second delay between messages to the same group.
- Message length: Telegram messages have a 4,096 character limit. For longer content, use the Telegram node's
Send Documentoperation to send a text file, or split the message using the Code node. - Error handling: Wrap your Telegram send nodes in an error workflow. If the bot token is revoked or a chat ID becomes invalid, you want to know immediately — not discover it days later when you realize alerts stopped.
- Keep workflows active: Telegram Trigger workflows must be active to receive messages. If your n8n instance restarts and workflows don't auto-activate, you'll miss messages. Running on a managed platform like n8nautomation.cloud ensures your workflows stay active with 24/7 uptime and automatic restarts.
- Security: Never share your bot token. If it leaks, immediately revoke it via BotFather with
/revokeand update the credential in n8n.
Tip: Use Telegram's /setcommands via BotFather to define your bot's command menu. This makes your slash commands discoverable — users see them as autocomplete suggestions when they type / in the chat.
Telegram bots paired with n8n workflows are one of the fastest ways to build useful automations. You get real-time messaging, rich formatting, inline buttons, file sharing, and group support — all orchestrated visually. Whether it's a simple alert pipeline or a full AI assistant, the Telegram nodes in n8n have you covered.
If you want to skip the server setup and jump straight to building, n8nautomation.cloud gives you a dedicated n8n instance starting at $15/month — ready for Telegram webhooks out of the box with zero configuration.