Home Create telegram bot to send service notification/alert
Post
Cancel

Create telegram bot to send service notification/alert

telegram-search-botfather

2. Create a new bot

Note 1: You can type /start for get all commands

  • Type /newbot in a message box
  • Type your bot name (whatever you want)
  • Type your bot username (must have suffix _bot) telegram-create-newbot

3. Create a channel

Create a channel so that your bot can send alert/notification to telegram

3.1 Set your bot as an admin

telegram-set-bot-admin

3.2 How to get your channel id

  1. Go to here
  2. Click on your channel
  3. Look at the URL and find the part that looks like c1234567890_1234567890123456789
  4. Get the string before underscore –> c1234567890
  5. Remove the prefixed letter –> 1234567890
  6. Add prefix with a -100 –> your channel id is -1001234567890

Now you can use your

  • Bot ID
  • Bot username
  • Channel ID and Telegram API to receive message/notification/alert from your services
This post is licensed under CC BY 4.0 by the author.