In­te­grat­ing Telegram into a self-hosted n8n setup lets you add messages and no­ti­fi­ca­tions directly to your au­toma­tion workflows. This guide shows you how to connect Telegram with n8n step by step and build your first simple workflows for incoming and outgoing messages.

Benefits of in­te­grat­ing Telegram with n8n

Telegram is an excellent choice for in­te­grat­ing with n8n because it provides a fast, reliable, and direct com­mu­ni­ca­tion channel. Messages are usually delivered in real time, so you can react quickly to events in your workflows. Compared to email or other no­ti­fi­ca­tion systems like Discord, which can also be connected to n8n, Telegram messages are more visible and often noticed faster on mobile devices. This makes Telegram ideal for time-critical alerts, status updates, and con­fir­ma­tions.

Another advantage is its simple com­mu­ni­ca­tion structure. Messages, files, images, and links can be sent easily and processed further in workflows. For example, you can au­to­mat­i­cal­ly send content from APIs, databases, or other tools like Jira with n8n to Telegram without de­vel­op­ing ad­di­tion­al in­ter­faces. Incoming messages can also trigger further au­toma­tions, making in­ter­ac­tive processes possible.

For self-hosted n8n setups, Telegram is practical because you do not need ad­di­tion­al in­fra­struc­ture for no­ti­fi­ca­tions. You can connect existing workflows directly to a messenger you already use every day. Team com­mu­ni­ca­tion is also easy to manage by sending messages to groups or channels, so several people can stay informed about important events at the same time.

n8n Hosting
Your best VPS—maximize pro­duc­tiv­i­ty with n8n au­toma­tion
  • Automate manual routines for tech teams
  • Au­toma­tion on your own server: no task limits, full cost control
  • Over 500 in­te­gra­tions and tools thanks to open source

Step 1: Meet the re­quire­ments

Before you start the actual setup, you should briefly check whether all the basics are in place. This saves a lot of time later, because the most common errors with Telegram triggers are not caused by the workflow itself, but by missing pre­req­ui­sites such as an n8n URL that isn’t publicly ac­ces­si­ble or a bot that hasn’t been created yet. The following re­quire­ments should be met:

  • A self-hosted n8n instance: Your n8n en­vi­ron­ment must already be running and ac­ces­si­ble via a browser.
  • A public URL for n8n: For incoming Telegram events, n8n requires an ex­ter­nal­ly ac­ces­si­ble HTTPS address for triggers.
  • A Telegram account with existing login cre­den­tials: You need valid cre­den­tials that you can store in n8n and an access token generated via BotFather.
  • Access to your n8n con­fig­u­ra­tion: If your instance is running behind a reverse proxy, you should be able to adjust en­vi­ron­ment variables such as WEBHOOK_URL, N8N_HOST, and N8N_PROTOCOL.
  • Op­tion­al­ly, a chat or group for testing: This lets you try out the in­te­gra­tion right away without affecting any pro­duc­tion workflows.
Tip

If you want to self-host n8n Telegram, there are several in­stal­la­tion options available. An n8n Docker in­stal­la­tion is flexible and ideal for custom setups or servers with direct access. For simple graphical man­age­ment, you can al­ter­na­tive­ly use an n8n Plesk in­stal­la­tion, where con­tain­ers are con­ve­nient­ly set up via the interface. Solutions like n8n with CasaOS also offer a quick start with an app-store-like user ex­pe­ri­ence. If, on the other hand, you value scal­a­bil­i­ty and high avail­abil­i­ty, you can install n8n with Ku­ber­netes to run more complex workloads reliably.

Step 2: Prepare Telegram cre­den­tials

To integrate Telegram with n8n, you need valid cre­den­tials that n8n can use to au­then­ti­cate with Telegram. These cre­den­tials allow n8n to send messages and, when using a trigger, receive incoming messages.

If you already have a Telegram account, you have covered the basic re­quire­ment. However, Telegram does not connect directly to n8n. Instead, it uses the Bot API, which requires an access token. This token acts as a unique key that n8n can use to com­mu­ni­cate with Telegram. In many cases, this access may already exist, for example if Telegram is already used in other tools or au­toma­tions. In that case, you can reuse the existing token and store it directly in n8n.

If no access token exists yet, you first need to create one as part of an n8n Telegram bot. This step is usually quick to complete. Treat the access token like a password. Anyone with access to it can send or process messages on behalf of your in­te­gra­tion. Store it securely and do not share it publicly.

Step 3: Make n8n correctly reachable for webhooks

If you use Telegram in n8n only to send messages, storing the cre­den­tials in n8n is enough. In this case, n8n actively es­tab­lish­es the con­nec­tion to Telegram, so no ad­di­tion­al con­fig­u­ra­tion is required.

However, if you want to process incoming messages and use Telegram as a trigger, your n8n instance must be reachable from the outside. Telegram sends new messages to n8n through webhooks, which are public URLs that external services can call. n8n creates these webhook URLs au­to­mat­i­cal­ly based on your con­fig­u­ra­tion. If your instance runs behind a reverse proxy, however, n8n may only know its internal address unless ad­di­tion­al settings are con­fig­ured. As a result, webhooks may be created but not work from the outside.

The following Docker Compose example shows how to configure your n8n instance so that it generates the correct public webhook URLs and external services like Telegram can reliably reach them:

services:
    n8n:
        image: n8nio/n8n:latest
        ports:
            - "5678:5678"
        environment:
            - N8N_HOST=n8n.example.com
            - N8N_PROTOCOL=https
            - WEBHOOK_URL=https://n8n.example.com/
            - N8N_PROXY_HOPS=1
        volumes:
            - ./n8n_data:/home/node/.n8n
Note

For pro­duc­tion en­vi­ron­ments, it’s rec­om­mend­ed to use a fixed image version (for example, n8nio/n8n:2.15.0) to avoid un­ex­pect­ed changes from automatic updates. Changes to en­vi­ron­ment variables such as N8N_HOST only take effect after the container has been restarted. Therefore, after every con­fig­u­ra­tion change, run the command docker compose down && docker compose up -d.

Step 4: Store Telegram cre­den­tials in n8n

Next, connect Telegram to your n8n instance. To do this, store the pre­vi­ous­ly prepared cre­den­tials once in n8n. n8n saves them as cre­den­tials, so you can reuse them in any workflow later without entering the token again.

Proceed as follows:

  1. Open your n8n interface in the browser.
  2. Create a new workflow to set up or test the in­te­gra­tion.
  3. Add a Telegram node.
  4. In the “Cre­den­tials” section, click “Create new cre­den­tial”.
  5. Enter your existing access token in the “Access Token” field.
  6. Save your entry.

After saving, the con­nec­tion to Telegram is available im­me­di­ate­ly. You can now select and use the cre­den­tials in any other workflow. This step only needs to be completed once. After that, you can use Telegram as often as you like in new or existing workflows.

Image: Add Telegram credentials in n8n
Once you have entered your access token in the “Access Token” field, you can connect to Telegram.

n8n then tests the con­nec­tion im­me­di­ate­ly and displays the result:

Image: Test Telegram credentials
The message “Con­nec­tion tested suc­cess­ful­ly” shows you that you can now access Telegram from n8n.

Step 5: Send your first Telegram message from n8n

To test the in­te­gra­tion, it’s a good idea to first create a very simple workflow that sends a message to Telegram. This lets you quickly check whether the con­nec­tion between n8n and Telegram is working correctly, without having to use more complex triggers or logic right away.

The basic structure of the workflow looks like this:

Manual Trigger -> Telegram

This means the workflow starts manually and then sends a message through the Telegram node. First, add a Manual Trigger node. This lets you run the workflow with a click. Then add a Telegram node and connect both nodes.

In the Telegram node, select the Telegram cre­den­tials you created earlier so n8n knows which login details to use. Then configure the node by selecting “Message” as the Resource and “Send Message” as the Operation. Next, specify the des­ti­na­tion. Enter either a chat ID or a channel name, for example “@chan­nel­name”. This de­ter­mines where the message will be sent. For testing, you can use any message text. In this example, we’ll use: Hello World! From n8n.

Image: n8n Telegram node: Send Message
You can use the Telegram node in n8n to send any message you like.

You can test whether sending works in the completed workflow by running the step with a click on “Execute step”:

Image: n8n Telegram node: Execute Step
After clicking “Execute step”, the node is executed and you can see the output (on the right) directly in the node.

Then start the workflow manually. If every­thing is set up correctly, the message will appear in Telegram im­me­di­ate­ly.

Image: n8n message in Telegram
The message sent from n8n is now displayed in your Telegram chat.

Step 6: Process incoming Telegram messages

If you want to use Telegram as an input channel, not just for sending messages, use the Telegram Trigger. This node starts your workflow au­to­mat­i­cal­ly whenever a new message arrives in Telegram. You can then process the incoming message and send a reply.

A simple workflow looks like this: Telegram Trigger -> Telegram

In this example, the workflow replies directly to an incoming message. First, add a Telegram Trigger node to your workflow. Then select the cre­den­tials you created earlier so n8n can access Telegram. Next, choose the desired event, such as receiving new messages.

Then add a Telegram node and connect it to the trigger. In this node, select the relevant send operation, for example “Send Message”.

To send the reply to the correct chat, use the chat ID from the trigger data. This lets the workflow reply au­to­mat­i­cal­ly to the same chat where the original message was received, so you do not need to enter the chat ID manually.

After a test run, n8n displays the received data in the output area of the Telegram Trigger node. There you can see which in­for­ma­tion is available, such as the message text, the chat ID, and other metadata.

Step 7: Use the workflow in pro­duc­tion

Once your workflow is working, you can activate it. n8n will then process incoming messages con­tin­u­ous­ly and au­to­mat­i­cal­ly send replies or no­ti­fi­ca­tions. Since the workflow has only been saved as a draft so far, you need to publish it first. To do this, click “Publish”. In older n8n versions, use the ac­ti­va­tion toggle instead.

Note

Telegram only allows one reg­is­tered webhook per bot. When you switch from the test URL to the pro­duc­tion URL, Telegram over­writes the previous webhook. As a result, the other URL no longer receives events. For this reason, always test trigger workflows in a separate, inactive workflow.

This makes Telegram a permanent part of your au­toma­tion setup and turns it into a com­mu­ni­ca­tion interface for your n8n workflows.

Three practical ideas for Telegram workflows with n8n

Telegram is ideal as an interface for no­ti­fi­ca­tions and in­ter­ac­tions within n8n. Using n8n Telegram is es­pe­cial­ly useful wherever in­for­ma­tion needs to be available quickly or where you have to react directly to events.

Example 1: Report server or website outages

With n8n, you can regularly check a website or server and have Telegram au­to­mat­i­cal­ly notify you if there are any issues. To do this, set up a workflow that runs at fixed intervals, for example every five minutes. An HTTP Request node then calls the desired website and checks whether it is reachable. Next, an IF node evaluates whether the status code indicates a problem, such as an error or timeout. In case of an error, n8n au­to­mat­i­cal­ly sends a message to Telegram, so you are notified im­me­di­ate­ly. This way, you can detect outages early without having to monitor the systems manually.

Image: n8n workflow with Telegram: Report outages
With just four nodes, you can create an n8n workflow that au­to­mat­i­cal­ly notifies you of outages via Telegram.

Example 2: Use Telegram as an input channel for queries

Telegram can also serve as a simple and direct input interface for your workflows. In this scenario, an incoming message au­to­mat­i­cal­ly starts a workflow in n8n. The content of the message is then evaluated, for example with an IF or Switch node. Depending on the content, different actions can be executed, such as re­triev­ing data from an API or a database. The results are then sent back to Telegram as a message. This creates a simple, in­ter­ac­tive flow where you can query in­for­ma­tion directly via chat. This way, you can quickly access data without having to log in to other systems.

Image: n8n workflow with Telegram: Execute queries
This workflow is triggered by a Telegram message and then au­to­mat­i­cal­ly performs queries; you also receive the results via Telegram.

Example 3: Au­to­mat­i­cal­ly forward new requests or events

Another common use case is the automatic for­ward­ing of events from other systems to Telegram. For example, as soon as a new request comes in via a form or an order is created in the shop, n8n can process this in­for­ma­tion. The workflow is started either via a webhook or a specific app trigger. The relevant data is then prepared and converted into a clear, un­der­stand­able message. This message is au­to­mat­i­cal­ly sent to a Telegram chat or group. In this way, you or your team always stay up to date without con­stant­ly having to check different systems. This is es­pe­cial­ly helpful in small teams, enabling fast response times and better oversight.

Image: n8n workflow with Telegram: Forward requests
Three nodes are enough to prepare form requests in n8n and forward them as a Telegram message.

Reviewer

Go to Main Menu