How to use Telegram Bot as Event Notifier to send instant notification on your Smartphone using PowerShell

Since we are working in IT industry & proving support to our clients, we are always dependent on various form of notification such as emails, sms, voice etc, and none of them are free, especially when the you are sending those traditional notifications across the globe. Currently almost everyone using smartphone, and mostly those are connected to the internet for 24×7, so I guess, it’s time to send those notifications smartly. Try using Telegram Bot for sending personal notification for free to any of the Smartphones.

To start with, you should create your own Bot on Telegram. You should ask the BotFather (father of all the Bots) to create a boot for you.


Install Telegram, register yourself and search for BotFather.

Once you find it, select it and tap on START button (I had already created this, so, I am getting RESTART button).

Once you tap START button, you will be greeted with the following message.

Now send /newbot and it will ask you to provide the name of your bot.

I gave it NotificationPS, and after that it will ask to provide thee name of your bot, I gave it PSNotificationXBot.
Note: Your name should end with Bot.

Once you gave it a unique name, BotFathar will share the APT Token to manage your Bot.

Now, again search for newly created bot and once you find it, select it.

Now, tap START button. (I had already selected this, so, I am getting RESTART button)

Now you must have the Chat ID to send the notification to yourself and to do it, please execute following in your PowerShell.

Once you get the Chat ID, execute the following code (function) to your PowerShell, this will help you later to send Telegram messages easily.

Now use the function we created earlier to send the message yourself. You can send message to multiple target at once.
Use,

This is how the messages will look like.

How this PS function help you?

  • This is just a sample function to let you know how telegram works with Bot.
  • You can use this to send notification of a critical service.
  • You can use this to send notification of a critical server outage.
  • You can use this function to any of the existing scripts those are already sending traditional notifications.
  • You also will be able send notification to a Telegram groups as well.
  • Technically there is no limitation.
  • Feel free to use this PowerShell function in your script.
  • Sharing some more ideas in the comments bellow.

Thanks for Reading, happy Scripting!!

Disclaimer: All posts and opinions on this site are provided AS IS with no warranties. These are my own personal opinions and do not represent my employer’s view in any way.

3 thoughts on “How to use Telegram Bot as Event Notifier to send instant notification on your Smartphone using PowerShell

  1. I want to to thɑnk youu for this very good read!!
    I definitеly njoyed every bit off it. I have gοt you ƅook-marked tto chᥱck ⲟut new stuff
    you post?

  2. It’s wonderful tһat you are getting ideas from this piece of writing as
    well as frⲟm our discussion made hеre.

  3. I have been cҺecking out a few of your stories and і
    can claim pretty good stuff. I willl definitely bookmark your website.

Leave a Reply

Your email address will not be published. Required fields are marked *