n8n Telegram integration: Set up, automate, and scale bots

n8n Telegram integration: Set up, automate, and scale bots

An n8n-Telegram integration lets you connect Telegram bots with n8n, a workflow automation tool that simplifies task automation across multiple services.

Telegram’s Bot API enables bots to interact with users, while n8n provides a visual, no-code interface for building custom workflows with connected tools.

By combining both platforms, you can automate messaging, manage notifications, trigger actions, and scale your bot operations – all without writing complex code.

What you’ll learn in this article is listed below:

  • How to set up your Telegram bot and connect it with n8n.
  • Ways to automate workflows using Telegram triggers and actions.
  • How n8n compares to tools like Zapier and Make.
  • Hosting options for scaling your Telegram automations.

Scroll down as we guide you through each step of building Telegram bots for n8n, highlight the benefits of integration, explain key Telegram nodes and operations, and share practical use cases for real-world automation.

What is n8n-Telegram integration?

n8n-Telegram integration connects n8n, a visual no-code workflow automation platform, with Telegram’s Bot API to automate communication tasks and manage real-time interactions through bots.

n8n lets you create and run workflows that integrate with thousands of services. Telegram’s Bot API enables you to build bots that send and receive messages, handle commands, and interact with users in real time.

Together, they let you trigger workflows based on Telegram events – like incoming messages – and perform actions such as sending text, images, documents, or locations.

This integration supports key automation features:

  • Webhooks. Trigger workflows instantly when a new Telegram message arrives.
  • Triggers and conditions. Run logic based on message type or user input.
  • Message handling. Process text, images, voice notes, and more within chat flows.
  • Two-way automation. Reply to users dynamically based on context or data.

You can also connect Telegram with other apps and services, like Google Sheets, Notion, OpenAI, or a CRM, to build powerful, end-to-end automations that go far beyond messaging.

This makes the integration a flexible and scalable solution for building Telegram bots that not only chat but also act, analyze, and automate entire workflows.

Why should you connect Telegram to n8n?

Connecting Telegram to n8n gives you a powerful way to automate communication, build smarter bots, and integrate Telegram with other tools without writing code.

This integration helps you save time and scale more efficiently, whether you’re sending alerts, managing customer messages, or triggering actions in other apps.

The reasons why it’s worth setting up are below:

  • Automate repetitive tasks. Trigger workflows when a Telegram message is received, send instant replies, or route data to your CRM, database, or spreadsheet.
  • Build custom bots with ease. Use n8n’s visual editor to create bots that respond to text, handle commands, or even process voice messages.
  • Integrate with thousands of services. Connect Telegram with tools like Google Sheets, Notion, Airtable, and OpenAI to build advanced, multi-step workflows.
  • Lower your automation costs. While tools like Zapier start at $19.99/month for just 750 tasks, n8n offers 2,500 executions for around $20/month – or even less if you self-host it on a virtual private server (VPS).

📚 Suggested reading

Discover what you can automate with n8n, from managing social media and syncing data across departments to tracking leads and customer interactions in your CRM.

Prerequisites

Before you start building your Telegram automation with n8n, make sure you have the following:

  • An active Telegram account, accessible via smartphone, desktop, or web.
  • A VPS from a trusted provider like Hostinger, where you can install n8n.
  • A basic understanding of how to use n8n and create automation workflows.
  • Credentials for any other platforms you plan to integrate, such as CRMs, databases, or AI tools (optional).

How do you build a Telegram bot for n8n?

To build a Telegram bot for your n8n workflows, you’ll first need to create a bot using BotFather and link it to n8n with the generated credentials. Once connected, you can trigger workflows when users send messages and automate replies based on those inputs.

The steps below explain how to set everything up in more detail.

1. Generate a bot using BotFather

To create a Telegram bot, start a chat with @BotFather in the Telegram app. BotFather is the official Telegram bot for creating and managing other bots.

Follow these steps:

  1. Send the /start command to begin.
  2. Type /newbot and follow the prompts.
    • Choose a display name. This can be anything and will appear in conversations.
    • Pick a username. It must be unique and end in bot. For example: my_n8n_bot or n8nTaskManagerBot.
  3. After setup, BotFather will send you a bot token, which looks like this:
123456789:AAExampleBotTokenRedactedForSecurity

Keep this token secure, as you’ll use it in n8n to connect your bot.

Adjust privacy mode (optional)

By default, Telegram bots in group chats only receive messages that mention them directly.

If you want your bot to respond to all messages in a group, send the /setprivacy command to BotFather and select Disable when prompted.

2. Create Telegram credentials in n8n

After receiving your bot token, create a new Telegram credential in n8n to let your workflows communicate with your bot.

Here’s how:

  1. Open your n8n dashboard and click the + icon → Credential in the left sidebar.
  2. From the list, choose Telegram API.
  3. In the Access Token field, paste the token you received from BotFather.
  4. Give the credential a clear name like My Telegram Bot so you can identify it later.
  5. Hit Save to store the credential.

n8n will automatically test the connection. If it works, you’re ready to move on.

⚠️ Troubleshooting tip

If the connection fails, check that your bot token is correct and hasn’t expired. Also, make sure your n8n instance is publicly accessible via HTTPS, as Telegram requires a secure connection for webhooks.

3. Add the On message trigger

Now that your bot is connected, add the Telegram Trigger node to start responding to incoming messages in real time.

Here are the steps:

  1. Create a new n8n workflow, then click Add first step on the canvas editor.
  2. Choose Telegram → On message. This tells n8n to start the workflow whenever your bot receives a new message.
  1. Select the Telegram credentials you created earlier.
  2. Hit Execute step to activate the listener.
  3. Open Telegram, find your bot, and send it a test message.

You should see a response in the right-hand JSON tab of the Telegram Trigger node showing the same message data:

If you see the message data appear, your Telegram bot is now successfully triggering workflows in n8n.

Core Telegram nodes and operations n8n supports

n8n offers several Telegram nodes that let you build custom workflows for messaging, automation, and bot interactions.

To create a Telegram automation workflow, start by adding the Telegram Trigger node to capture incoming messages. Based on the content, you can branch your logic to perform actions such as replying, forwarding data to another app, or triggering an AI tool.

The table below breaks down the main Telegram operations available in n8n:

OperationDescription
✅ Get ChatRetrieves basic info about a chat or user, such as chat ID or type.
Leave GroupRemoves the bot from a specific group chat.
Get FileDownloads a file sent to the bot.
Delete Chat MessageDeletes a message sent in a chat.
Edit Message TextUpdates the text of a previously sent message.
Pin Chat MessagePins a specific message in a chat.
✅ Send DocumentSends a file like PDF, CSV, or DOCX to a user or group.
Send LocationSends GPS coordinates to a Telegram chat. Useful for location-based bots.
✅ Send MessageSends a text message to a user or group. Supports markdown and emojis.
✅ Send PhotoSends an image to a chat by file path or URL.

✅ = Most commonly used operations

Here’s how Telegram categorizes different elements in your workflows:

  • Messages are inputs (text, voice, media) that users send to your bot.
  • Chats refer to the context, whether it’s a private user, group, or channel.
  • Files include photos, documents, and audio messages you send or receive.
  • Callbacks are responses triggered by inline buttons, useful for interactive bots.

Also, keep these limitations and setup notes in mind when building Telegram workflows:

  • Telegram bots can register only one webhook URL at a time. If you create multiple workflows with Telegram triggers, only the most recently activated one will receive incoming messages.
  • Bots created in BotFather must have privacy mode disabled to function correctly in group chats.
  • File uploads follow Telegram’s API limits – up to 50 MB for most file types.

n8n Telegram automation use cases

Now it’s time to build automations that save time and streamline your daily tasks. From sending internal alerts or running customer-facing bots, Telegram and n8n work together to handle everything from real-time messaging to multi-app workflows.

You don’t need to start from scratch, because n8n offers ready-to-use Telegram templates you can easily customize to fit your use case.

If you prefer to build your workflow manually, that works too. Below are a few practical examples to help you get started with your own Telegram automations.

1. Send downtime alerts to a team chat

Problem:

Monitoring website uptime manually is inefficient and unreliable, especially if your team depends on real-time updates to respond to outages. Without instant alerts, even a few minutes of downtime can lead to lost traffic, missed sales, or frustrated users.

Solution:

Automate downtime notifications by sending instant alerts to a Telegram team chat. Your team will receive updates the moment your site goes down – or comes back online – without refreshing status pages or watching dashboards manually.

Implementation:

This workflow uses a Webhook node in n8n to receive alert data from UptimeRobot (or any monitoring tool that supports webhooks) and a Telegram node to send a formatted message to your group chat.

When UptimeRobot detects a status change, it triggers the webhook. n8n processes the incoming data and sends a clear, structured message to Telegram with the site name, URL, status, and a call to action.

Workflow:

  1. Prepare your Telegram bot
    • Create a new Telegram group or use an existing one.
    • Add your Telegram bot to the group and promote it as an admin.
    • In n8n, create a new workflow and temporarily add a Telegram Trigger On message node.
    • Send a message to the group.
    • In the Telegram node’s right-hand panel, copy the Chat ID. It usually starts with a minus sign, like -1001234567890.
    • Save the Chat ID for later and delete the trigger node, as you won’t need it again.
  2. Add a Webhook node
    • In your workflow, add a Webhook node.
    • Set HTTP Method to POST.
    • Set the path to uptime-alert. This generates a URL like https://your-n8n-instance.com/webhook/uptime-alert.
    • Leave the other settings as default.
  3. Integrate UptimeRobot with the webhook
    • In UptimeRobot, go to Integrations & API → Webhook.
    • Paste your webhook URL.
    • Configure optional fields like alert type or monitor name, if needed.
    • Trigger a test alert to send data to your webhook.
  4. Add a Telegram node
    • Connect it to the Webhook node.
    • Set Operation to Send Message.
    • In the Chat ID field, paste the group Chat ID you saved earlier.
    • In the Text field, paste this message template:
🚨 *Uptime Alert*

🔗 *Site:* {{ $json.body.monitorFriendlyName }}
🌐 *URL:* {{ $json.body.monitorURL }}
📶 *Status:* {{ $json.body.alertTypeFriendlyName }}

{{ $json.body.alertType == "1" ? "❌ The site is *DOWN*. Please check it immediately." : "✅ The site is *UP* again. All systems go." }}
  1. Test and activate the workflow
    • Execute the workflow to check for errors.
    • If successful, n8n will send a formatted alert to your Telegram group.
    • Once confirmed, save and activate the workflow.

Outcome:

Your team now receives real-time, easy-to-read Telegram alerts whenever your site goes down or comes back online. This automation improves your response time, reduces the impact of downtime, and helps you maintain smooth service operations.

2. Build an AI assistant bot

Problem:

Manually responding to customer messages through Telegram is time-consuming and inconsistent.

Whether you’re answering FAQs or providing status updates, it often pulls attention away from more important tasks and slows down response times, especially outside business hours.

Solution:

Build an AI-powered Telegram assistant using n8n and OpenAI. The assistant receives messages, generates helpful responses in real time, and replies automatically.

This setup gives you a 24/7 virtual assistant that handles repetitive inquiries, boosts engagement, and saves your team time.

Implementation:

This workflow uses a Telegram Trigger node to listen for incoming messages. It passes the message to an LLM Chain node, which builds a prompt and sends it to OpenAI’s chat model.

The AI-generated response is then sent back to the user through a Telegram Send Message node.

Workflow:

  1. Add the Telegram Trigger node
    • Set Trigger On to Message so it listens for incoming text messages.
    • Send a test message to your bot to confirm the connection.
  2. Add the LLM chain node
    • Connect it to the Telegram Trigger node.
    • In the Prompt field, use:
{{ $json.message.text }}
  • Set the system prompt to guide the assistant’s tone, such as:
You are a helpful assistant responding to customer messages in a friendly, concise way.
  1. Add the OpenAI node
    • Connect it to the LLM Chain node as the language model provider.
    • Set up your OpenAI API key if you haven’t already.
    • Select your preferred model, like gpt-4.1-mini.
  2. Add the Telegram Send Message node
    • Connect it to the LLM Chain node.
    • In the Chat ID field, use:
{{ $('Telegram Trigger').item.json.message.chat.id }}
  • In the Text field, insert:
{{ $json.text }}

This sends the AI-generated response back to the same chat that sent the message.

  1. Test and activate the workflow
    • The bot should reply with a friendly, AI-generated response based on your system prompt.
    • Once confirmed, activate the workflow.

Outcome:

You now have a smart Telegram assistant that replies instantly using AI. It reduces response times, handles repetitive questions, and supports users around the clock without any manual input.

You can later expand the bot’s capabilities by adding features like voice message transcription, context memory, or integration with your internal tools for more personalized responses.

3. Automate customer support ticket management

Problem:

Manually handling support requests in Telegram can quickly become overwhelming. Without a system to track incoming messages, assign ticket IDs, or route issues to the right team, it’s easy to miss messages and leave customers waiting.

Solution:

Automate your support ticket intake using n8n and Telegram. This workflow captures incoming messages, generates a unique ticket ID, confirms the user’s request, and forwards the ticket details via email to your support team.

The result is a streamlined process that keeps your team and users informed without switching between tools or manually copying messages.

Implementation:

This workflow uses a Telegram Trigger node to listen for new messages, a Code node to extract and format ticket data, and two outputs: a Telegram Send Message node to confirm receipt to the user, and an Email Send node to notify your support team.

Workflow:

  1. Add the Telegram Trigger node
    • Set Trigger On to Message and send a test message to your bot.
  2. Add a Code node to generate ticket data
    • Connect the Code node to the Telegram Trigger.
    • Paste the following JavaScript to extract user details and generate a unique ticket ID:
const now = new Date().toISOString();
const ticketId = 'TICK-' + Math.floor(10000 + Math.random() * 90000);

return [
  {
    json: {
      ticketId,
      userId: $input.first().json.message.chat.id,
      username: $input.first().json.message.from.username,
      fullName: $input.first().json.message.chat.first_name + ' ' + ($input.first().json.message.chat.last_name || ''),
      messageText: $input.first().json.message.text,
      timestamp: now
    }
  }
];
  1. Confirm ticket receipt with a Telegram message
    • Add a Telegram Send Message node and connect it to the Code node.
    • In the Chat ID field, insert:
{{ $json.userId }}
  • In the Text field, use:
🙌 Hello *{{ $json.fullName }}*! Thanks for contacting support. We’ve received your message and assigned Ticket ID: *{{$json["ticketId"]}}* Our team will review it and get back to you soon.
  1. Forward ticket details via email
    • Add an Email Send node and connect it to the Telegram node.
    • Set up your SMTP credentials if you haven’t already, and use a verified email as the sender.
    • Enter your support team’s inbox as the recipient.
    • In the Subject field, insert:
[New Ticket] {{ $('Code').item.json.ticketId }} from {{ $('Code').item.json.fullName }}
  • In Body, paste the following:
🆕 New Support Ticket Received

🆔 Ticket ID: {{ $('Code').item.json.ticketId }}
👤 From: {{ $('Code').item.json.fullName }}
🔢 Telegram User ID: {{ $('Code').item.json.username }}
🕒 Time: {{ $('Code').item.json.timestamp }}

📝 Message:
"{{ $('Code').item.json.messageText }}"

📲 Reply directly in Telegram if needed:  
https://t.me/{{ $('Code').item.json.username }}

—
This message was automatically generated by your n8n support workflow.
  1. Test and activate the workflow
    • After testing, you should receive a confirmation message in Telegram.
    • Your support team should receive an email with the full ticket details.
    • Once verified, activate the workflow to run it continuously.

Outcome:

You’ve now automated the first stage of your customer support process. Each Telegram message becomes a structured ticket with a unique ID, instant user confirmation, and an email alert to your support team.

In the future, consider logging tickets in a CRM, storing them in a database for tracking, or connecting to project management tools to automatically assign tasks, turning this into a fully automated support pipeline.

n8n vs Zapier vs Make for Telegram bots

n8n, Zapier, and Make are popular automation tools to build workflows across various tools, including those involving Telegram bots. The following table compares how they handle Telegram automation, pricing, flexibility, and hosting options:

Featuren8nZapierMake
Pricing modelStarts at €20/month for 2,500 executions (cloud); free if self-hostedStarts at $19.99/month for 750 tasks; free plan availableStarts at $9/month for 10,000 operations
Telegram capabilitiesFull access via Telegram node; supports sending/receiving messages, inline keyboards, and file uploadsAvailable as a premium app; supports basic message sending/receivingFull integration; supports advanced actions with Telegram bots
Execution limitsStarts at 2,500 executions/month on the Starter plan; unlimited if self-hostedStarts at 750 tasks/month on the Pro plan; higher tiers increase the limitStarts at 1,000 operations/month; additional operations cost extra
Customization flexibilityVery high; supports JavaScript, custom code, and conditional logicModerate; limited to UI and prebuilt actionsHigh; includes visual logic builder, routers, and custom modules
Developer-friendlinessBuilt for developers; supports JSON manipulation, function nodes, and self-hostingBeginner-friendly; focused on low-code and no-code usersBalanced; no-code UI with advanced control options
Self-hosted vs cloud-onlyCloud and self-hostedCloud onlyCloud only

Summary:

  • n8n offers the most control and flexibility, which is ideal for developers or teams who want to host their automation system or run complex Telegram bots without hitting task limits.
  • Zapier is beginner-friendly but limited in Telegram functionality and customization.
  • Make falls between the two. It provides a more flexible editor than Zapier, but still comes with execution and platform constraints.

If you’re building scalable Telegram workflows that involve AI tools, advanced message handling, or multi-app integrations, n8n offers the best combination of power, price, and control.

📚 Suggested reading

Want a full head-to-head comparison of n8n with the platforms above? Check out our detailed articles: n8n vs Zapier and n8n vs Make.

Choose the right hosting for your n8n Telegram automations

Reliable hosting is essential for Telegram bots and automations that need to run consistently and respond in real time.

Since Telegram uses webhooks to communicate with your n8n workflows, your server must stay online 24/7, support HTTPS, and handle sudden traffic spikes, especially as your bots grow in complexity.

With n8n VPS hosting from Hostinger – starting from $4.99/month – you get a ready-to-use environment that makes automation easy from day one.

Each plan includes n8n pre-installed as a template, eliminating the need for the manual setup process that often causes errors. Instead, you can start building and launching workflows right after purchase, even if you’re new to automation.

For high-volume workflows or more advanced setups, Hostinger’s n8n VPS supports queue mode, which lets you manage multiple executions without overloading your system.

When your needs grow, scaling is seamless – upgrade to a higher-tier plan with just a few clicks. We offer VPS resources with up to 8 vCPU cores, 32 GB of RAM, and 400 GB of NVMe storage to support your automation at any scale.

Scale and monitor your automations

As you build n8n workflows with your Telegram bot, it’s important to optimize them for long-term performance, reliability, and scalability. n8n gives you complete control over how your automations evolve.

A few smart ways to scale and monitor your Telegram bot workflows are below:

  • Track execution metrics to monitor performance and identify bottlenecks.
  • Add error-handling nodes to catch failures and keep workflows running smoothly.
  • Enable queue mode to manage multiple executions without overloading your server.
  • Plan for horizontal scaling if your automation volume grows over time.

Your hosting environment also plays a key role in maintaining automation stability. That’s why it’s important to run your workflows on a dependable provider like Hostinger. Our n8n VPS hosting plans offer a reliable, high-performance setup that’s easy to scale as your needs grow.

All of the tutorial content on this website is subject to Hostinger's rigorous editorial standards and values.

Author
The author

Ariffud Muhammad

Ariffud is a Technical Content Writer with an educational background in Informatics. He has extensive expertise in Linux and VPS, authoring over 200 articles on server management and web development. Follow him on LinkedIn.