# Watcher - Mail ouput : send .csv from input

**URL:** <https://discuss.elastic.co/t/watcher-mail-ouput-send-csv-from-input/368121>\
**Category:** Elasticsearch\
**Created:** [October 2, 2024, 9:30am UTC](https://discuss.elastic.co/t/watcher-mail-ouput-send-csv-from-input/368121 "2024-10-02T09:30:10Z")\
**Posts on this page:** 2\
**Page:** 1

<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:** [October 2, 2024, 9:30am UTC](https://discuss.elastic.co/t/watcher-mail-ouput-send-csv-from-input/368121/1 "2024-10-02T09:30:10Z")

</div>

Hello,

I've created a watcher that sends an email containing a list of items that the Input returns to me. The Watcher sends this list by mail, in the body of the mail. Is it possible to send this list in a .csv file?

Thx !

---

<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:** [October 30, 2024, 12:37pm UTC](https://discuss.elastic.co/t/watcher-mail-ouput-send-csv-from-input/368121/2 "2024-10-30T12:37:22Z")

</div>

I found a solution :

Make a Discover view \> Share \> Csv -\> copy link.

Inside a Watcher :

```auto
 "actions": {
    "send_email": {
      "email": {
        "profile": "standard",
        "attachments": {
          "name.csv": {
            "reporting": {
              "url": "*Discover link*",
              "auth": {
                "basic": {
                  "username": "username",
                  "password": "password"
                }
              }
            }
          }
        },
        "to": [
          "mail@mail.com"
        ],
        "subject": "Subject",
        "body": {
          "text": "body"
        }
      }
    }
  }

```
