Integrating Telegram with OpManager

Telegram is a cloud-based instant messaging, video telephony and VoIP service with end-to-end encryption. Users can send messages and exchange photos, videos, stickers, audio and files of any type in Telegram. Using webhook, you can now integrate Telegram with OpManager and receive instant alerts on networks faults in your Telegram Group.

Supported Version: OpManager 12.5.192 & above

To integrate OpManager with Telegram, kindly refer the below steps.

  1. Creating a new bot in Telegram with admin privileges
  2. Retrieving the <<chat_id>> and verifying the <<token>>
  3. Configuring webhook in OpManager

Creating a new bot in Telegram with admin privileges

  1. In Telegram, search for BotFather. BotFather is a program that helps you create custom bots for your preferences.
  2. Enter the command /start.
  3. In the response, click on /newbot.
  4. Follow the responses and provide a custom name and a unique username for your bot.
  5. Once the bot is created, a unique <<token>> is generated which helps you control the bot.
  6. Open the newly created bot and add it to the Group to which OpManager alerts must be notified.
  7. Provide Admin privileges to the bot.
  8. Integrating OpManager with Telegram

Retrieving the <<chat_id>> and verifying the <<token>>

  1. Hit the request<<token>>/getUpdates in your browser.
  2. In the response, verify the name of your Group and copy the <<chat_id>>
  3. To check the <<token>>, hit the request<<token>>/sendMessage?chat_id=<<chat_id>>&text=<<custom_message>>
  4. Check if the <<custom_message>> is delivered to your Telegram Group.
Integrating OpManager with Telegram

Configuring webhook in OpManager

  1. In OpManager webclient, go to Settings > Notifications > Add Profile.
  2. Choose Invoke a Webhook.
  3. After selecting HTTP Method POST, paste the webhook URL<<token>>/sendMessage
  4. Choose form_urlencoded as the DataType.
  5. In the Custom Parameters box,
    1. Type chat_id and enter its corresponding value <<chat_id>>
    2. Add another field text and select the required variable such as Message of the alarm.
  6. Click on Next.
  7. Select the criteria, filter the devices, and choose your Time Window for which the alerts need to be communicated to the Telegram Group.


  8. Finally, provide a name for the webhook notification, and click on Save.

OpManager has now been integrated with telegram successfully. All the alerts from OpManager will now be sent to the corresponding Telegram group.

Thank you for your feedback!

Was this content helpful?

We are sorry. Help us improve this page.

How can we improve this page?
Do you need assistance with this topic?
By clicking "Submit", you agree to processing of personal data according to the Privacy Policy.