Check out what you can do with NetworkAllarm
You can customize the script using the config file
Monitoring your connection via Telegram with simple Messages
NetworkAllarm is free to download and easy to use
NetworkAllarm is using MIT License
Developer of NetworkAllarm