RdpGuard Telegram Integration - configure bot tokens and send notifications to chats and channels
RdpGuard
Intrusion prevention system for your Windows Server
 

RdpGuard Custom Actions and Telegram Integration

Telegram Integration Overview

Telegram is a popular messaging app that allows you to send messages, photos, videos, and files to your contacts. You can also create Telegram Bots and Channels to send messages to multiple users.

RdpGuard can send notifications to your Telegram chat or channel using the Telegram Bot API.

To send messages to a Telegram chat or channel, you need to create a new Telegram Bot and obtain the API Token. You also need to know the Chat ID of the chat or the Channel ID of the channel you want to send messages to.

To help you get started, we have prepared a step-by-step guide on how to create a new Telegram Bot, obtain the API Token, and get the Chat ID and Channel ID.

You can use the obtained API Token, Chat ID, and Channel ID to configure the Send Telegram message action in RdpGuard.

How to create a Telegram bot

Create your bot using @BotFather, Telegram's official bot for creating and managing bots.

  1. Open Telegram and search for @BotFather. Choose the verified account, as shown below.

    Find the verified BotFather account.
    Find the verified BotFather account.
  2. Open the chat with BotFather and click Start.

    Start a chat with BotFather.
    Start a chat with BotFather.
  3. Send /newbot to create a new bot.
  4. Choose a name for your bot.
  5. Choose a unique username ending in bot.
  6. Copy the API Token provided by BotFather.
Choose a name and username for your bot. Copy the API Token.
Choose a name and username for your bot. Copy the API Token.

Keep your API Token secure and do not share it with anyone.

Sending messages to a Telegram chat

Use a private chat with your bot to receive notifications in your own Telegram account. RdpGuard can retrieve the Chat ID for you.

  1. Open your bot in Telegram, click Start, and send it a message.

    Find your bot in Telegram.Click Start to begin a chat with your bot.Send a message to your bot.
    Start a chat with your bot and send it a message.
  2. Run RdpGuard Dashboard as administrator. Open Tools, Custom Actions / Notifications and click Add.
  3. Choose an Event, such as IP Blocked, and select Send Telegram message in the Task field.
  4. Paste the token from BotFather into Bot token and click Get chats.

    Enter your bot token and click Get chats.
    Enter your bot token and click Get chats.
  5. Select your chat in the Chat list. Edit the Message if needed; you can use the custom action variables to include the IP address, user name, and other event details.
  6. Click Run test and confirm to send a test message to the selected chat.
  7. Keep Enable this custom action checked and click Add action.

    Add the action with your chat and notification message.
    Add the action with your chat and notification message.
  8. Click Save changes in the Custom Actions dialog.

If you see No chats found or your chat is missing, send a new message to your bot and click Get chats again. RdpGuard finds chats in the bot's recent updates, which Telegram keeps for no more than 24 hours. Once the action is saved, you do not need to send daily messages to keep receiving notifications.

Sending messages to a Telegram channel

Use a Telegram channel to share RdpGuard notifications with multiple subscribers. Add your bot as an administrator with permission to post messages, then select the channel in RdpGuard. You can use an existing channel or create a new one below.

To create a new Telegram channel:

  1. Open the Chats tab in Telegram and click New Message.

    Click New Message on the Chats tab.
    Click New Message on the Chats tab.
  2. Click New Channel.

    Choose New Channel.
    Choose New Channel.

    If Telegram displays an introduction, click Create Channel.

    Click Create Channel to continue.
    Click Create Channel to continue.
  3. Choose a name for your channel and click Next.

    Choose a channel name and click Next.
    Choose a channel name and click Next.
  4. Choose the privacy settings for your channel and click Next.

    Choose the channel privacy settings and click Next.
    Choose the channel privacy settings and click Next.

To add your bot as a channel administrator:

  1. Open your channel from the Chats tab.

    Open your channel.
    Open your channel.
  2. Click the channel name to open its settings.

    Open the channel settings.
    Open the channel settings.
  3. Click Administrators.

    Open Administrators.
    Open Administrators.
  4. Click Add Admin.

    Click Add Admin.
    Click Add Admin.
  5. Search for your bot and select it.

    Find and select your bot.
    Find and select your bot.
  6. Allow Post Messages and click Add Admin.

    Enable Post Messages and click Add Admin.
    Enable Post Messages and click Add Admin.

Publish a new message in the channel so RdpGuard can find it.

To configure channel notifications in RdpGuard:

  1. Run RdpGuard Dashboard as administrator. Open Tools, Custom Actions / Notifications and click Add.
  2. Choose an Event and select Send Telegram message in the Task field.
  3. Paste your bot token into Bot token and click Get chats.

    Click Get chats to find your channel.
    Click Get chats to find your channel.
  4. Select your channel in the Chat list and enter the notification Message.
  5. Click Run test and confirm to send a test message to the channel.
  6. Keep Enable this custom action checked and click Add action.

    Add the action with your channel and notification message.
    Add the action with your channel and notification message.
  7. Click Save changes in the Custom Actions dialog.

If the channel is missing, check that your bot is an administrator with permission to post messages. Publish a new channel message and click Get chats again.

RdpGuard 10.4.5 Free Trial

RdpGuard protects:

Our customers say

"This sotware is really great. It's a relief. Because my server is constantly under attack. Thanks RdpGuard" - Joaquim De Sousa Marques

"Nice product. I used to implement something similiar in a low-tech and cumbersome manner via a script called TSBlock (not mine). This makes it much easier and is well worth the pricetag for SMB's." - J. Johnson

"Absolutely amazed at your product. We are a church in the North Dallas area, and I discovered this morning multiple failed logon attempts via our Remote Access Server. A friend suggested your product, so I immediately downloaded the trial. It had a list of about five blocked IP addresses in minutes, and that was enough to lead me to push the BUY button. Over the past 10-15 minutes the list is now about thirty with at least a third being international attempts to break into our system. Thanks for a great product. You may have just saved us much grief." - John Hallford

"Love the software. RDP on our Windows servers is just ridiculous. We would block it in the router but we have lots of old-time customers that would have issues." - Scott Hirsch

"Love the software! Makes it easier than tailoring VB Scripts!!" - Nick Brennan

"It's a great product - really stopping those RDP attackers :-)" - Dave, UK

"First of all: Your application is very (!!!) useful and I like it very much securing my 2012 R2 server. RdpGuard is the best solution, I found on the market and after 10 minutes of testing it I ordered the fully-featured version. :-)" - Carsten Baltes

Our Other Products
Copyright © 2012-2026 Netsdk Software FZE. All rights reserved.  Terms of Use.  Privacy Policy.