# Elasticsearch watcher - x-pack - markdown in slack notification

**URL:** <https://discuss.elastic.co/t/elasticsearch-watcher-x-pack-markdown-in-slack-notification/86251>\
**Category:** Elasticsearch\
**Created:** [May 18, 2017, 11:56am UTC](https://discuss.elastic.co/t/elasticsearch-watcher-x-pack-markdown-in-slack-notification/86251 "2017-05-18T11:56:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![brijesh\_amin](https://avatars.discourse-cdn.com/v4/letter/b/e36b37/32.png) [@brijesh\_amin](https://discuss.elastic.co/u/brijesh_amin)\
**Post date:** [May 18, 2017, 11:56am UTC](https://discuss.elastic.co/t/elasticsearch-watcher-x-pack-markdown-in-slack-notification/86251/1 "2017-05-18T11:56:39Z")

</div>

I am trying to get make user and channels links to work in slack notifications on elasticsearch/x-pack. I have tried using "markdwn": true and ""

```
  "actions": {
    "notify-slack": {
      "slack": {
        "message": {
          "mrkdwn": true,
          "to": "@brijesh",
          "text": "<!U0FMK07QC|brijesh> errors on test module",
          "dynamic_attachments": {
            "list_path": "ctx.payload.hits.hits",
            "attachment_template": {
              "title": "Error on {{_source.environment}} v{{_source.version}}",
              "text": "{{_source.message}}"
            }
          }
        }
      }
    }

```

I noticed such implementation being discussed here,

> [@Markdown in Watcher Slack Action attachements](https://discuss.elastic.co/t/markdown-in-watcher-slack-action-attachements/67353):
>
> Hello, I'm configuring my X-Pack to send me Slack messages when I log an error in ES. The trick is I'd like to have the stacktrace formatted as a code block so I tried this "notify\_slack": { "slack": { "message": { "to": "@me", "text": "Proxy monitoring", "attachments" : [{ "mrkdwn\_in": ["text"], "title" : "Errors Found", "text" : "Encountered {{ctx.payload.hits.total}} errors in the last minute…

I wonder is this feature still not available in x-pack? Any workaround to make this work?

What I want to achieve is to be able to link users and channels mentioned in slack message to be linked and not just display as normal text.

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [May 19, 2017, 12:09pm UTC](https://discuss.elastic.co/t/elasticsearch-watcher-x-pack-markdown-in-slack-notification/86251/2 "2017-05-19T12:09:09Z")

</div>

It is not yet available. Do you need the `mrkdwn: true` field or would the `mrkdwn_in` field be sufficient for your usecase as well? Just to make sure this works when expected, when taking a stab at it.

happy to get any feedback!

---

<div class="post-metadata">

**Author:** ![brijesh\_amin](https://avatars.discourse-cdn.com/v4/letter/b/e36b37/32.png) [@brijesh\_amin](https://discuss.elastic.co/u/brijesh_amin)\
**Post date:** [May 21, 2017, 12:22pm UTC](https://discuss.elastic.co/t/elasticsearch-watcher-x-pack-markdown-in-slack-notification/86251/3 "2017-05-21T12:22:59Z")

</div>

Hi Spinscale,

I think mrkdwn\_in should do the job for now. However, having both of them would be really useful.

Thanks,  
Brijesh

---

<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 18, 2017, 12:23pm UTC](https://discuss.elastic.co/t/elasticsearch-watcher-x-pack-markdown-in-slack-notification/86251/4 "2017-06-18T12:23:08Z")

</div>

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