# Templating email notifications

**URL:** <https://discuss.elastic.co/t/templating-email-notifications/332535>\
**Category:** Kibana\
**Created:** [May 4, 2023, 10:15am UTC](https://discuss.elastic.co/t/templating-email-notifications/332535 "2023-05-04T10:15:12Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mark\_DP](https://avatars.discourse-cdn.com/v4/letter/m/ecae2f/32.png) [@Mark\_DP](https://discuss.elastic.co/u/Mark_DP)\
**Post date:** [May 4, 2023, 10:15am UTC](https://discuss.elastic.co/t/templating-email-notifications/332535/1 "2023-05-04T10:15:12Z")

</div>

Hi all,

I hope you can help. I have a liitle problem:  
I created several alerts which nearly delivers the same text but sometimes a few parts of them changes. So I tried to use variables but did not found al solution.  
For Example I have a text in the body of the email

[SystemOwner] 2323-office

This cchnges from time to time to  
[SystemOwner] xyz

To avoid editing 150 alerts I wanted to put the xyz part into a variable and then work with this variable like (example)

variable\_of\_xyz = "New-XYZ"  
[SystemOwner] {variable\_of\_xyz}

which then display in the body of the email  
[SystemOwner] New-XYZ

Or perhaps I can put the whole text in a kind of include-file and include it within the email text?  
So I only have to edit the text from time to time.

Thanks to all,  
I hope you understand my description...

---

<div class="post-metadata">

**Author:** ![GinkoLucas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ginkolucas/32/107055_2.png) [@GinkoLucas](https://discuss.elastic.co/u/GinkoLucas)\
**Post date:** [May 4, 2023, 2:41pm UTC](https://discuss.elastic.co/t/templating-email-notifications/332535/2 "2023-05-04T14:41:13Z")

</div>

Hi,

So if I summarize you would like to show the value of a variable in the body of the email?

Where does your variable come from? Isn't it rather a field ?

Are you using Watcher or Rules for alerting ?

---

<div class="post-metadata">

**Author:** ![Mark\_DP](https://avatars.discourse-cdn.com/v4/letter/m/ecae2f/32.png) [@Mark\_DP](https://discuss.elastic.co/u/Mark_DP)\
**Post date:** [May 5, 2023, 6:50am UTC](https://discuss.elastic.co/t/templating-email-notifications/332535/3 "2023-05-05T06:50:11Z")

</div>

I do not know what is used. How can I determine it?  
It is the Alerting of OpenDistro for Elasticsearch.  
See enclosed pictures

 ![Monitor](https://us1.discourse-cdn.com/elastic/original/3X/e/c/ec50184171e2c0e55f01a36dc166dbe8b2c055b2.jpeg)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 5, 2023, 6:50am UTC](https://discuss.elastic.co/t/templating-email-notifications/332535/4 "2023-05-05T06:50:11Z")

</div>

OpenSearch/OpenDistro are AWS run products and differ from the original Elasticsearch and Kibana products that Elastic builds and maintains. You may need to contact them directly for further assistance.

(This is an automated response from your friendly Elastic bot. Please report this post if you have any suggestions or concerns :elasticheart: )

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [May 5, 2023, 6:55am UTC](https://discuss.elastic.co/t/templating-email-notifications/332535/5 "2023-05-05T06:55:01Z")

</div>

As per the bot you will need to ask aws, that's a different product to the one we release.

---

<div class="post-metadata">

**Author:** ![Mark\_DP](https://avatars.discourse-cdn.com/v4/letter/m/ecae2f/32.png) [@Mark\_DP](https://discuss.elastic.co/u/Mark_DP)\
**Post date:** [May 5, 2023, 7:28am UTC](https://discuss.elastic.co/t/templating-email-notifications/332535/6 "2023-05-05T07:28:19Z")

</div>

Ah. Ok. Thanks.  
I just found the documentation because of the hint 🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 2, 2023, 7:28am UTC](https://discuss.elastic.co/t/templating-email-notifications/332535/7 "2023-06-02T07:28:21Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
