# Doc + meta =\> csv + email

**URL:** <https://discuss.elastic.co/t/doc-meta-csv-email/123586>\
**Category:** Logstash\
**Created:** [March 12, 2018, 3:50pm UTC](https://discuss.elastic.co/t/doc-meta-csv-email/123586 "2018-03-12T15:50:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexus/32/12696_2.png) [@alexus](https://discuss.elastic.co/u/alexus)\
**Post date:** [March 12, 2018, 3:50pm UTC](https://discuss.elastic.co/t/doc-meta-csv-email/123586/1 "2018-03-12T15:50:23Z")

</div>

My goal:

I have a several docs spread across of multiple indices that I'd like to export as CSV with addition meta data set and email as attachment on daily basis using Logstash.

* * *

Logstash plugin:

- input:
  - [Elasticsearch input plugin | Logstash Reference](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-elasticsearch.html)

- output:
  - [Csv filter plugin | Logstash Reference](https://www.elastic.co/guide/en/logstash/6.2/plugins-filters-csv.html)
  - [Email output plugin | Logstash Reference](https://www.elastic.co/guide/en/logstash/current/plugins-outputs-email.html)

* * *

my typical document is very simple: "key", "value". I also have additional meta data set that I wish to include with each of the key as well: (example: key,value,meta1,meta2,meta3), "meta" data set stored inside of same index as each document.

I was able to figure out how to export docs as CSV on it's own, however I require some help with stitching my docs + meta and then email.

Please advise.

---

<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:** [April 9, 2018, 3:50pm UTC](https://discuss.elastic.co/t/doc-meta-csv-email/123586/2 "2018-04-09T15:50:46Z")

</div>

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