I’ve built a small open-source shell script to get rich Telegram notifications from Duplicati backups. Instead of minimal status messages, it uses Duplicati’s --run-script-after / --run-script-before hooks to send HTML-formatted Telegram reports that include:
Clear status with icons (success / warning / error)
Changed files (added / modified / deleted)
Size and duration metrics
Optional detailed logs when a backup fails
The script is Docker-friendly (supports env vars and .env files for Bot Token and Chat ID), and it handles CRLF line endings so it works reliably even if you edit it on Windows and run it in a Linux container.
Integration is straightforward: make the script executable and point Duplicati’s --run-script-after (or --run-script-before) option to it.
If you’d like more readable, information-dense Telegram notifications for your Duplicati jobs, you can find the project here:
Feedback, ideas for additional fields, and PRs are very welcome!
The variable name Duration is correct. The problem was that the sed pattern \w* in the script couldn’t capture the value because it contains : and . (e.g. 00:00:03.3462766). I’ve updated notify_to_telegram.sh to extract Duration using grep -oP instead, and added a ⏱ Duration: $Duration line to the Telegram message.