Sending notifications with Telegram BOT from Vigor Router

ChatBots have been widely used nowadays. Social media Apps have ChatBots; Messaging Apps have ChatBots. Many stores use ChatBots to answer questions, increase customer engagement for promotion, and offer additional ways to order from them. Do you know Vigor Router can also use ChatBot for executing one of its functionality? Yes, Vigor Router supports using TelegramBot to send notifications/ alerts of network events, including VPN down/up, WAN down/up, Web Login events, etc. This article will show the setup.

1. To create a chatbot on Telegram, we can search @BotFather and add it to the contact. @BotFather is actually a bot used to create other bots. Then send a message /newbot to him, which will lead to creating our bot for sending the notifications. The token info will be used on the Vigor Router’s configuration later.

2. Similarly, we search @userinfobot on Telegram and add it to the contact. @userinfobot is a bot we can ask for the Chat ID or said the user ID. Send a message /start to the bot, and he will reply to the Telegram Chat ID/ User ID. The ID info will be used on the Vigor Router's configuration later.

3. Go to Objects Setting >> SMS/Mail Service Object, select index 9, and configure the customized SMS provider profile.

-Enter the name for the Service Provider.

-Enter the following API of the Telegram Bot. The token we got from Step 1 needs to be filled in the API without double quotes.”Your Bot Token”/sendMessage?chat_id=###txtDest###&text=###txtMsg###

4. Click Send a Test message to confirm if the TelegramBot we created can send the message correctly.

5. Enter the Telegram ID from step 2 as the cellphone number, then click OK. Vigor Router will send the test message to the Telegram ID.

6. Check the Telegram App on the phone and see if the test message is received.

7.Go to Objects Setting >> Notification Object, select an index, and configure the events that need the notification.

8. Go to Applications >> SMS/Mail Alert Service, check to Enable an index, select the SMS service provider we created for TelegramBot, the notification profile, and enter the Recipient Number. The Recipient Number is the network administrator's Telegram User Chat ID got from step 2.

9. The network administrator will receive the notification of Vigor Router on the Telegram App when the defined events happen.

Published On:2023-04-14 

Was this helpful?