Using Telegram as a platform and not only as an instant messaging app is one of the beauties of it. Why not also use it to receive notification coming from systems I manage? Here's a step by step on how you can use it on Synology's DSM version 7.2.
- You need to go to the BotFather and create a new bot to receive its token.
- Now, start a chat with your bot. Send the
/start
command and another message afterwards. - On your CLI, run the following command to get your chat identifier:
curl https://api.telegram.org/bot<YOUR_BOT_TOKEN>/getUpdates | jq '.result[].message.chat.id'
- Access your DSM dashboard and open Control Panel.
- Go to Notification, click on the Webhooks tab and then
Add
. - Set the provider as
Custom
and the rule as you wish. Click next. - The provider name as
Telegram
, the subject as%DATE% at %TIME% - %HOSTNAME%
and the Webhook URL ashttps://api.telegram.org/bot<YOUR_BOT_TOKEN>/sendMessage
. - On the HTTP requests setting, go to
Parameter
and set two fields:text
with@@TEXT@@
andchat_id
with the value you got on step 3. - Save and send a test message.
Done, this should be enough to get you telegram notifications.