Grafana Alert Rules: custom email notification

Hello team:
We are attempting to change the look and feel of the email body that we want to send associated to the alert rules being fired.
This is not a feature in the alert rules area, so we researched a bit and found the HTML file that Grafana uses for this purpose. So we edited it in order to add a couple of PNG images to the original HTML code.
We tested the changes to the HTML file by restarting our Grafana docker, and pressing the “Test” button in a Contact Point, and it worked fine. The modified email was received in the destination mailbox.
However, when a rule is fired, the email is not received.

¿ Has anyone tried the same with good results? Any help will be greatly appreciated.

Best regards, Rogelio

PS: I have seen a similar posting, but in my case I just want to add a couple of images to the original email body. The strange thing here is that the Test procedure succeeds whereas once fired, the rule fails in sending the email with the modified body.

PS2:
Grafana version 9.3.1 running on docker.
HTML file name: ng_alert_notification.html

Hi…

What is your alert rule and the html template?

Regards,
Fadjar

Hello Fadjar:
The following is my alert rule (provisioned via HTTP API); it is currently firing and it has a set of labels attached to it.

The label/value pair, called “team=QosExperts”, is tied to a notification policy:

The policy is tied to a contact point:

When I press the “Test” button in the contact point section, I get the email. When the alert fires up, the email is not received.

When I resort back to Grafana´s original HTML file, both the Test button and the alert rule send the email.

I do not know how to upload the HTML files without overwhelming this form (either the original one or the modified one); they are quite long to paste them here. I will try to get the HTML files and upload the modified section in here.

Thanks!

I am unable to load either of the HTML files.

We found the location of the template in this piece of the documentation: