# How to include a custom rule variable in Elastic Email alert

**URL:** <https://discuss.elastic.co/t/how-to-include-a-custom-rule-variable-in-elastic-email-alert/324849>\
**Category:** Elasticsearch\
**Created:** [February 7, 2023, 3:55am UTC](https://discuss.elastic.co/t/how-to-include-a-custom-rule-variable-in-elastic-email-alert/324849 "2023-02-07T03:55:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yoshiouchi](https://avatars.discourse-cdn.com/v4/letter/y/7ba0ec/32.png) [@yoshiouchi](https://discuss.elastic.co/u/yoshiouchi)\
**Post date:** [February 7, 2023, 3:55am UTC](https://discuss.elastic.co/t/how-to-include-a-custom-rule-variable-in-elastic-email-alert/324849/1 "2023-02-07T03:55:47Z")

</div>

I would like to know a way to create a custom rule variable in Elastic Email alert i.e. we have some pre-built variables like {{alertName}} or {{context.group}} but I want to output the name of kubernetes.pod.name in Elastic Email alert.

---

<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:** [March 7, 2023, 3:56am UTC](https://discuss.elastic.co/t/how-to-include-a-custom-rule-variable-in-elastic-email-alert/324849/2 "2023-03-07T03:56:43Z")

</div>

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