# Grafana Alerting on Telegram getting webhook error 400 Bad Request

**URL:** <https://community.grafana.com/t/grafana-alerting-on-telegram-getting-webhook-error-400-bad-request/145640>\
**Category:** Alerting\
**Tags:** telegram\
**Created:** [March 5, 2025, 9:09pm UTC](https://community.grafana.com/t/grafana-alerting-on-telegram-getting-webhook-error-400-bad-request/145640 "2025-03-05T21:09:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![irrelectronica](https://avatars.discourse-cdn.com/v4/letter/i/b9e5f3/32.png) [@irrelectronica](https://community.grafana.com/u/irrelectronica)\
**Post date:** [March 5, 2025, 9:09pm UTC](https://community.grafana.com/t/grafana-alerting-on-telegram-getting-webhook-error-400-bad-request/145640/1 "2025-03-05T21:09:50Z")

</div>

Hello,  
Grafana Version: 11.5.2

I’m new to Grafana and am trying to set up a custom alert message to be sent to Telegram. I’ve configured the contact point and understand that to send a custom message, I can do so from the option in _Contacts Point → My Telegram Contact Point → “Edit” → “Edit Message” → “Enter custom message”_. If I enter something simple and perform a test send, the message is sent:

`{{ .Status }}`

However, if I attempt like:

`{{ define "telegram_message" }}Alerta de prueba básica{{ end }}`

I receive the following error:  
**Failed to send test alert.: failed to send telegram message: webhook response status 400 Bad Request**

For both examples de Parse Mode is set to None.

Anyway the alert it is working without any try to set a custom message like the example 2.

I was taking as a reference

> [@Working configuration example for alerts templating - Telegram](https://community.grafana.com/t/working-configuration-example-for-alerts-templating-telegram/120912):
>
> Hi Grafana community! I’ve tried several times to make the alert message on Telegram easy to read, informative, and remove unnecessary messages. After some trial and error, I found a good template here [https://community.grafana.com/t/re-working-configuration-example-for-alerts-templating-telegram-and-slack/119950](https://community.grafana.com/t/re-working-configuration-example-for-alerts-templating-telegram-and-slack/119950). However, there are a few things that I added (according to my needs). I really appreciate to @bLd759 for creating such a good and understandable alert example. Important : This confi…

I’m stuck here

---

<div class="post-metadata">

**Author:** ![antonio](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/antonio/32/26584_2.png) [@antonio](https://community.grafana.com/u/antonio)\
**Post date:** [March 6, 2025, 1:25pm UTC](https://community.grafana.com/t/grafana-alerting-on-telegram-getting-webhook-error-400-bad-request/145640/2 "2025-03-06T13:25:11Z")

</div>

Hola @irrelectronica ! 👋

You got it mostly right! You just need to first create the Notification template under **Contact Points \> Notification Templates**.

These are the steps :

1. Create the template  

2. Go back to your contact point, click edit message in the Optional telegram settings, and select your `telegram_message` template.  

3. Try to send a test notification.  

4. You should receive the templated message in Telegram  

I recommend you to check out our [tutorial on templating notifications](https://grafana.com/tutorials/alerting-get-started-pt4/).

We’ve also been working on improving the templating documentation. [Templates | Grafana documentation](https://grafana.com/docs/grafana/latest/alerting/fundamentals/templates/)

Hope it helps!

---

<div class="post-metadata">

**Author:** ![irrelectronica](https://avatars.discourse-cdn.com/v4/letter/i/b9e5f3/32.png) [@irrelectronica](https://community.grafana.com/u/irrelectronica)\
**Post date:** [March 6, 2025, 7:49pm UTC](https://community.grafana.com/t/grafana-alerting-on-telegram-getting-webhook-error-400-bad-request/145640/3 "2025-03-06T19:49:53Z")

</div>

Ok. I’m making some progress now. Thank you for your time!
