# Ctx.payload.hits.hits in a tabular format within email box

**URL:** <https://discuss.elastic.co/t/ctx-payload-hits-hits-in-a-tabular-format-within-email-box/173976>\
**Category:** Kibana\
**Tags:** elastic-stack-alerting\
**Created:** [March 26, 2019, 5:11pm UTC](https://discuss.elastic.co/t/ctx-payload-hits-hits-in-a-tabular-format-within-email-box/173976 "2019-03-26T17:11:53Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![cjcenizal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cjcenizal/32/11216_2.png) [@cjcenizal](https://discuss.elastic.co/u/cjcenizal)\
**Post date:** [March 26, 2019, 8:37pm UTC](https://discuss.elastic.co/t/ctx-payload-hits-hits-in-a-tabular-format-within-email-box/173976/2 "2019-03-26T20:37:28Z")

</div>

Hi there, have you taken a look at [Watcher Email has Incorrect Format Using Mustache Template](https://discuss.elastic.co/t/watcher-email-has-incorrect-format-using-mustache-template/29344)? This user also asked about formatting of tables in HTML. For that user, they were able to define a body like this to create an HTML table:

```auto
<head> <h1>Long Running Processes</h1> </head> <body> <table> <tr><th>Number
     1</th> <th>Number 2</th> </tr>{{#ctx.payload.hits.hits}} <tr><td>1</td> <td>2</td> </tr>
     {{/ctx.payload.hits.hits}}</table> </body>

```

I think you could adapt this to your use case too.

Hope this helps,  
CJ

---

_[View the full topic](https://discuss.elastic.co/t/ctx-payload-hits-hits-in-a-tabular-format-within-email-box/173976)._
