Grafana Alerting on Telegram getting webhook error 400 Bad Request

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

I’m stuck here

Hola @irrelectronica ! :waving_hand:

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.

We’ve also been working on improving the templating documentation. Templates | Grafana documentation

Hope it helps!

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