Telegram notifications

Telegram notifications

Contents

Introduction

Telegram notifications can be used to receive urgent notifications. At present, only text messaging is supported.

Create a Telegram Bot

To be able to receive messages in the Telegram messenger, you must first create your own Telegram bot.

To get started, message @BotFather (this is the official service of the Telegram messenger) to register your bot and receive its token.

Send the command: /newbot and follow the instructions. @BotFather will ask you for a name for your bot (what users will see) and a username (what users will use to find your bot). The username must end in bot.

@BotFather will then provide you with an API Token.

bot_10.png

This is crucial: keep it secure, save your Token string! You'll use this Token to control your bot.

Start Telegram Bot to work

Follow the link suggested by @BotFather (in our example t.me/VutmasterTest9913_bot) and in the window that appears, click the START button, or enter the command /start.

bot_12.png

Now the Telegram bot is ready to work and send you messages.

If you want to receive messages in a group, you can add the Telegram bot to the group of Telegram users.

Create notification for Telegram

To create a notification for Telegram you have to specify the following parameters:

  1. Go to "System tree menu" >> Press the "+" icon at the top right corner. You will see the following modal window:

bot_14.png

2. Click on the "Telegram" element. Fill in the required parameters:

Parameter

Description

Parameter

Description

Name

The name of the element in the system

Token

Telegram API Token received from @BotFather earlier

Message text

The text of the message contains information about the event in the system. Can contain macros - the characteristics of the system, calculated at the time of operation. Learn more about Macros at How to use macros in the text of a notification

bot_15.png
  1. Click the Update button to get the parameters of the chat or group to which messages will be sent.
    - If you receive a message that the specified bot was not found, it means that the Token was written incorrectly or the bot was not started. Check the Token or start the bot as described above.
    - If you receive a message that the chat is empty, this means that there were no events in the chats associated with the bot and it is impossible to determine their parameters. This can happen if the bot was created a long time ago (about a day or more) and has not been used. To fix this, write any text in the chat if the bot is connected to an individual chat. If the bot is connected to a user group, then remove it from the group and add it to the group again.

  1. Check the received chat or group settings - Bot name and Chat title. They should match your bot name and the chat username or group name.

Each new chat or group requires the creation of a new unique notification.


Our system uses the parameters of the last activity associated with the bot to determine the desired chat or group. Therefore, if the chat parameters do not match the desired ones (this may happen if the bot is added to several chats), then perform activity in the desired chat (write any message) or group (delete and add the bot again).
Then try sending a text message by clicking the Test button, it should arrive in the specified chat.

bot_19.png
  1. If everything works as expected, you can save the element by clicking the Save button. The notification element can now be used in logic schemes (Logic schemes) and for group notifications (Using group notifications) .
    Don't forget to save the system settings by clicking the icon in the upper right corner of the screen.