I realize this is an old post, but this is the first Google result for "unRAID Telegram", and I found @Bokonon's post above remarkably helpful, and I'd like to contribute a bit more. As noted above, upon restart, the changes made to NotificationAgents.xml are erased. To get around that, we can use a brittle, but functioning shell script:
# Rename current NotificationAgents.xml.
mv /usr/local/emhttp/webGui/include/NotificationAgents.xml /usr/local/emhttp/webGui/include/NotificationAgents.old
# Insert Telegram chunk and redirect out to new NotificationAgents.xml file.
sed '/<\/Agents>/{
r /boot/customAgents/telegram.xml
a \</Agents>
d
}' /usr/local/emhttp/webGui/include/NotificationAgents.old > /usr/local/emhttp/webGui/include/NotificationAgents.xml
Instructions:
Add the above script to the bottom of your /boot/config/go file.
Create a directory called "customAgents" in the /boot folder (flash drive).
Create a file in customAgents called "telegram.xml" and put the contents of @Bokonon's post into that new file.
Then, upon restart, the Telegram agent xml stuff should get shoved into the NotificationAgents.xml. It's not the best solution, but it does work for now.