Hello,
I am desperately trying to set up a Telegram bot which notifies me when a backup was successful or canceled.
I specify the following parameters in the UI:
–send-telegram-bot-id=
–send-telegram-channel-id=
–send-telegram-any-operation=true
–send-telegram-message=Duplicati %OPERATIONNAME% report for %backup-name%
%RESULT%
I have also tried other entries but always get the following error message:
System.ArgumentNullException: Value cannot be null. (Parameter ‘stringToEscape’)
at System.ArgumentNullException.Throw(String paramName)
at System.UriHelper.EscapeString(String stringToEscape, Boolean checkExistingEscaped, SearchValues`1 noEscape)
at Duplicati.Library.Modules.Builtin.SendTelegramMessage.SendMessageChunk(String message, Int32 partNumber, Int32 totalParts)
I am using the version Duplicati - 2.1.0.5_stable_2025-03-04
It looks like this could happen if you forget to set --send-telegram-channel-id, but you show that it is indeed set. You are missing --send-telegram-api-key in the list, but that should give a different error.
With 2.1.0.5 there is an issue with the modules (including the Telegram module) where they are not unloaded, but instead re-used. This can sometimes cause weird behavior, where settings on one backup run are “lingering” on another backup run. This has been fixed in the latest canary build.
Can you try to restart Duplicati and then run with all the options correctly set?
But the conditions are met. I already use the same bot for UptimeKuma and the messages arrive without any problems.
I have also created a new bot and tried it again. It didn’t work there either.
My entire configuration looks like this:
–send-telegram-bot-id=123456789x:xXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXXXXX
–send-telegram-any-operation=true
–send-telegram-message=Duplicati %OPERATIONNAME% report for %backup-name%