If you're looking for a quick and simple way to connect your n8n automation workflows with a Telegram bot, this article provides clear step-by-step instructions. Whether you're new to automation or seeking a more efficient workflow integration solution, this guide will help you complete the entire configuration in minutes.
Telegram is more than just an instant messaging tool; its Bot API offers powerful support for automation scenarios. By connecting n8n with Telegram, you can achieve:
This integration method is particularly well-suited for scenarios requiring real-time feedback, remote control, or multi-channel notifications.
Before configuring the connection in n8n, you need to create a bot in Telegram and obtain its Access Token.
In the Telegram search bar, enter BotFather. This is the official bot management tool provided by Telegram. After clicking to start a conversation, you'll see a list of available commands.
Enter the /newbot command. BotFather will guide you through the following steps:
YouTube TG Demo.bot, for example, YouTubeTGDemo_bot.Once completed, BotFather will return a message containing your API Token (e.g., 123456789:ABCdefGhIjklmNoPQRsTUVwxyZ). This token is the key credential for connecting to n8n, so please keep it safe.
After obtaining your token, proceed with the configuration in n8n.
Navigate to your n8n workflow interface and add a Telegram Trigger node. If you haven't created a workflow yet, you can click the "+" button in the top-right corner to create a new one.
Within the Telegram Trigger node:
YouTube TG Demo.After saving your credentials, click the Test Step button. Then, go back to Telegram, find the bot you just created, and send a test message, such as Hello, n8n!.
Within a few seconds, you should see the message content in n8n's output panel, indicating a successful connection.
Telegram bots are public by default; anyone can find and use them by their username. To prevent unauthorized use of your workflows, it's recommended to add a simple authentication logic.
After the Telegram Trigger node, add an IF node:
This ensures that only messages from your own account pass the verification and proceed with the subsequent workflow. Others, even if they find your bot, won't be able to trigger your automation logic.
Once successfully connected, you can implement many practical features with n8n + Telegram:
You can use the /revoke command in BotFather to revoke the old token and generate a new one. Then, update the credentials in n8n with the new token.
You can use the Contains or In Array condition in the IF node to add multiple allowed Chat IDs to a whitelist.
Absolutely. In addition to the Trigger node, n8n also offers a Telegram Action node, which allows you to actively send messages, images, files, and other content to specified Chat IDs or channels.
During the first test of the Telegram Trigger, the output data will include message.from.id, which is your Chat ID. You can also quickly obtain it using Telegram's @userinfobot.
Outline

 (1) (1) (1).png)
