Telegram Notification

Hi,

Is there a way to get a notification (in this case on Telegram) whenever a remote device becomes online and when it’s up-to-date?

Thanks!

1 Like

Hi,

Telegram API is pretty easy to use in bash/batch scripting to send bot messages. With some good “up2date” detectors already to be found on this forum, it might be easy to put things together into a little monitor.

For Telegram, it is mainly three steps:

  • chat with BotFather and create a bot, note the API key.
  • open new chat with your bot, type /start
  • api call telegram:/getMessages – note the chatId
  • api call telegram:/sendMessage – send your desired msg from batch script to the chat

Sources: https://github.com/fabianonline/telegram.sh/blob/master/telegram // https://core.telegram.org/bots

2 Likes

Thanks for the quick reply. I’m fairly comfortable with the Telegram API but I can’t seem to find information on the detectors… could you point me to further info, please?

I think this topic is a good starter to see how the rest api of syncthing works: Status of folder with pending Revert Local Changes and where they are documented is linked, too.

1 Like