Failover on ROS 7 with notifications to the Telegram

I needed to do a failover on ROS 7 from pppoe interface to lte1 interface with notifications to the Telegram when ISP 1 to ISP2 failover. I tried to find for ROS 7 something like this on this forum, but unfortunately I didn’t find it. I would be extremely grateful to anyone who share a script that allows you to do this.