Custom Telegram notification template #1784

Closed
opened 2026-02-28 02:32:26 -05:00 by deekerman · 16 comments
Owner

Originally created by @Scan4u on GitHub (Jan 16, 2023).

⚠️ Please verify that this bug has NOT been raised before.

  • I checked and didn't find similar issue

🛡️ Security Policy

📝 Describe your problem

Hello! I kindly ask for your advise.
I use the Uptime Kuma 1.19.4 in Docker container. For the notification messages I use the Telegram.

Is it possible to change the view of default Telegram notifications template?

For example, I want to remove a brackets [ ] and the Message text after Up/Down status icons to get a result similar to the view in the green frame below:
зображення

🐻 Uptime-Kuma Version

1.19.4

💻 Operating System and Arch

Ubuntu 20.04

🌐 Browser

Firefox

🐋 Docker Version

Docker 20.10.22

🟩 NodeJS Version

Originally created by @Scan4u on GitHub (Jan 16, 2023). ### ⚠️ Please verify that this bug has NOT been raised before. - [X] I checked and didn't find similar issue ### 🛡️ Security Policy - [X] I agree to have read this project [Security Policy](https://github.com/louislam/uptime-kuma/security/policy) ### 📝 Describe your problem Hello! I kindly ask for your advise. I use the Uptime Kuma 1.19.4 in Docker container. For the notification messages I use the Telegram. **Is it possible to change the view of default Telegram notifications template?** For example, I want to remove a brackets [ ] and the Message text after Up/Down status icons to get a result similar to the view in the green frame below: ![зображення](https://user-images.githubusercontent.com/16424225/212680765-0bd5c86f-7f62-4e7a-a902-635517f9c0e6.png) ### 🐻 Uptime-Kuma Version 1.19.4 ### 💻 Operating System and Arch Ubuntu 20.04 ### 🌐 Browser Firefox ### 🐋 Docker Version Docker 20.10.22 ### 🟩 NodeJS Version -
deekerman 2026-02-28 02:32:27 -05:00
  • closed this issue
  • added the
    Stale
    help
    labels
Author
Owner

@Scan4u commented on GitHub (Jan 17, 2023):

Kindly waiting. Somebody, help, please!

@Scan4u commented on GitHub (Jan 17, 2023): Kindly waiting. Somebody, help, please!
Author
Owner

@AndreKotze commented on GitHub (Jan 25, 2023):

I have wondered the same and would also like to know how to edit the notifications as each protocol seems to have a different text structure - some with short text and some with long.

Screenshot_20230125-113639_Telegram

@AndreKotze commented on GitHub (Jan 25, 2023): I have wondered the same and would also like to know how to edit the notifications as each protocol seems to have a different text structure - some with short text and some with long. ![Screenshot_20230125-113639_Telegram](https://user-images.githubusercontent.com/4725308/214529797-a8d36889-e38f-4396-8db8-ab04e474e1ee.jpg)
Author
Owner

@Scan4u commented on GitHub (Feb 2, 2023):

Any chance to get this feature? Please, advise..

@Scan4u commented on GitHub (Feb 2, 2023): Any chance to get this feature? Please, advise..
Author
Owner

@agarwalbikram commented on GitHub (Mar 19, 2023):

This feature would be good, How can we archive this?

@agarwalbikram commented on GitHub (Mar 19, 2023): This feature would be good, How can we archive this?
Author
Owner

@pigate-eu commented on GitHub (Apr 21, 2023):

Any news/tricks to change the telegram text?

@pigate-eu commented on GitHub (Apr 21, 2023): Any news/tricks to change the telegram text?
Author
Owner

@CommanderStorm commented on GitHub (May 25, 2023):

@Scan4u is this a duplicate of #975 ?
If not, what is the difference?

@CommanderStorm commented on GitHub (May 25, 2023): @Scan4u is this a duplicate of #975 ? If not, what is the difference?
Author
Owner

@CommanderStorm commented on GitHub (May 25, 2023):

@agarwalbikram @Scan4u
Please refrain from posting +1 / requests for updates things on issues, as this makes issue-management harder.
Issues are for discussing what needs to be done how by whom.
We use 👍🏻 on issues to prioritise work.

@CommanderStorm commented on GitHub (May 25, 2023): @agarwalbikram @Scan4u Please refrain from posting `+1` / requests for updates things on issues, as this makes issue-management harder. Issues are for discussing what needs to be done how by whom. [We use 👍🏻 on issues to prioritise work](https://github.com/louislam/uptime-kuma/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc).
Author
Owner

@CommanderStorm commented on GitHub (May 25, 2023):

@pigate-eu

Any news/tricks to change the telegram text?

Until #975 is resolved, no.
However: This project is open source =>You can change the code of the notification provider at https://github.com/louislam/uptime-kuma/blob/master/server/notification-providers/telegram.js and deploy using the guide in the readme instead of docker

@CommanderStorm commented on GitHub (May 25, 2023): @pigate-eu > Any news/tricks to change the telegram text? Until #975 is resolved, no. However: This project is open source =>You can change the code of the notification provider at https://github.com/louislam/uptime-kuma/blob/master/server/notification-providers/telegram.js and deploy using the guide in the readme instead of docker
Author
Owner

@github-actions[bot] commented on GitHub (Aug 23, 2023):

We are clearing up our old issues and your ticket has been open for 3 months with no activity. Remove stale label or comment or this will be closed in 2 days.

@github-actions[bot] commented on GitHub (Aug 23, 2023): We are clearing up our old issues and your ticket has been open for 3 months with no activity. Remove stale label or comment or this will be closed in 2 days.
Author
Owner

@github-actions[bot] commented on GitHub (Aug 25, 2023):

This issue was closed because it has been stalled for 2 days with no activity.

@github-actions[bot] commented on GitHub (Aug 25, 2023): This issue was closed because it has been stalled for 2 days with no activity.
Author
Owner

@vladtvoeit commented on GitHub (Jun 13, 2024):

Has anyone found a solution to the problem? How can I remove the extra text in the telegram notification? Thank you.

@vladtvoeit commented on GitHub (Jun 13, 2024): Has anyone found a solution to the problem? How can I remove the extra text in the telegram notification? Thank you.
Author
Owner

@CommanderStorm commented on GitHub (Jun 13, 2024):

Please see my message from above:

Until #975 is resolved, no.
However: This project is open source => You can change the code of the notification provider at https://github.com/louislam/uptime-kuma/blob/master/server/notification-providers/telegram.js

Our contributution guide is here:
github.com/louislam/uptime-kuma@fbf7b77ceb/CONTRIBUTING.md

Alternatively, you can build your own notification provider via the webhook notification provider which talks to telegram the way you need it.

@CommanderStorm commented on GitHub (Jun 13, 2024): Please see my message from above: > Until #975 is resolved, no. > However: This project is open source => You can change the code of the notification provider at https://github.com/louislam/uptime-kuma/blob/master/server/notification-providers/telegram.js Our contributution guide is here: https://github.com/louislam/uptime-kuma/blob/fbf7b77cebc81707fa56cfa91ebd8f6dbaac0112/CONTRIBUTING.md Alternatively, you can build your own notification provider via the webhook notification provider which talks to telegram the way you need it.
Author
Owner

@VecH commented on GitHub (Jul 3, 2025):

cd /opt/uptime-kuma
docker exec -it uptime-kuma bash
sed -i "s|text: msg,|text: msg.split(' PING')[0],|" /app/server/notification-providers/telegram.js
exit
docker restart uptime-kuma
  1. Go to the Docker folder of the UpTime Kuma container
  2. Go to the container shell
  3. Replace the text in the Telegram notification file (cuts out the word PING and everything that comes after it in the message text)
  4. Exit the container shell
  5. Restart the container

After updating the container, the contents of the Telegram template file may change
and this tweak may not work

Before
Image

After
Image

@VecH commented on GitHub (Jul 3, 2025): ```bash cd /opt/uptime-kuma docker exec -it uptime-kuma bash sed -i "s|text: msg,|text: msg.split(' PING')[0],|" /app/server/notification-providers/telegram.js exit docker restart uptime-kuma ``` 1. Go to the Docker folder of the UpTime Kuma container 2. Go to the container shell 3. Replace the text in the Telegram notification file (cuts out the word PING and everything that comes after it in the message text) 4. Exit the container shell 5. Restart the container After updating the container, the contents of the Telegram template file may change and this tweak may not work Before ![Image](https://github.com/user-attachments/assets/f05ba88a-195d-48a8-9152-2a6c0b264178) After ![Image](https://github.com/user-attachments/assets/82a1f9e9-07d5-4df2-8db4-b72a081cb688)
Author
Owner

@CommanderStorm commented on GitHub (Jul 4, 2025):

Or you could just use the build in templating for telegram thwat we are shipping in v2

@CommanderStorm commented on GitHub (Jul 4, 2025): Or you could just use the build in templating for telegram thwat we are shipping in v2
Author
Owner

@AndreKotze commented on GitHub (Jul 4, 2025):

Thanks @VecH, that worked for me.

I don't have UK running in a container but I was able to run the command against "/opt/uptime-kuma/server/notification-providers/telegram.js" with the same outcome... :-)

@AndreKotze commented on GitHub (Jul 4, 2025): Thanks @VecH, that worked for me. I don't have UK running in a container but I was able to run the command against "/opt/uptime-kuma/server/notification-providers/telegram.js" with the same outcome... :-)
Author
Owner

@VecH commented on GitHub (Jul 4, 2025):

Or you could just use the build in templating for telegram thwat we are shipping in v2

I don't use the second version, I'm waiting for the stable one to come out

Although I want to test it, is it possible to update to the current version with data transfer?

@VecH commented on GitHub (Jul 4, 2025): > Or you could just use the build in templating for telegram thwat we are shipping in v2 I don't use the second version, I'm waiting for the stable one to come out Although I want to test it, is it possible to update to the current version with data transfer?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/uptime-kuma#1784
No description provided.