Sending Telegram notifications
Describes the how to configure sending notifications via Telegram
Last updated
Was this helpful?
Describes the how to configure sending notifications via Telegram
Last updated
Was this helpful?
To send a notification via Telegram you need to supply a channel id, a bot token and a an api key.
To obtain the bot token (aka bot id), message the @BotFather
bot. After creating the bot, send a message to the bot, so it can reply. For more details on Telegram bots, see the Telegram bot documentation.
After obtaining the bot token you can obtain the channel id with a cURL script:
To obtain the API key, follow the Telegram guide to creating an application.
With all required values obtained, you can set up the Telegram notifications in the general settings:
You can toggle between the two views using the "Edit as list" and "Edit as text" links.
Besides the mandatory options, it is also possible to configure:
The notification message and format
Conditions on when to send emails
Conditions on what log elements to include
Bot Configuration
--send-telegram-bot-id
(String)
- The Telegram bot ID that will send messages
--send-telegram-api-key
(String)
- The API key for authenticating your Telegram bot
Message Destination
--send-telegram-channel-id
(String)
- The channel ID where messages will be sent
--send-telegram-topid-id
(String)
- Topic ID for posting in specific topics within Telegram groups
Notification Content
--send-telegram-message
(String)
- Template for message content with support for variables like %OPERATIONNAME%, %REMOTEURL%, %LOCALPATH%, and %PARSEDRESULT%
--send-telegram-result-output-format
(format)
- Format for presenting operation results
Duplicati
Json
Notification Filtering
--send-telegram-level
(level)
- Controls which result types trigger notifications:
Success - Only successful operations
Warning - Operations that completed with warnings
Error - Operations that failed with recoverable errors
Fatal - Operations that failed with critical errors
All - All operation results regardless of status
--send-telegram-any-operation
(Boolean)
- When enabled, sends notifications for all operations, not just backups
--send-telegram-log-level
(Enumeration)
- Sets minimum severity level for included log entries:
ExplicitOnly - Show only explicitly requested messages
Profiling - Include performance measurement data
Verbose - Include detailed diagnostic information
Retry - Include information about retry attempts
Information - Include general status messages
DryRun - Include simulation mode outputs
Warning - Include potential issues that didn't prevent completion
Error - Include critical failures that require attention
--send-telegram-log-filter
(String)
- Filters log entries based on specified patterns
--send-telegram-max-log-lines
(Integer)
- Limits the number of log lines included in notifications
For details on how to customize the notification message, see the section on customizing message content.