# Data in CSV to email

**URL:** <https://discourse.nodered.org/t/data-in-csv-to-email/32195>\
**Category:** Developing Nodes\
**Created:** [29 August 2020 20:10 UTC](https://discourse.nodered.org/t/data-in-csv-to-email/32195 "2020-08-29T20:10:49Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![tadi](https://avatars.discourse-cdn.com/v4/letter/t/9f8e36/32.png) [@tadi](https://discourse.nodered.org/u/tadi)\
**Post date:** [29 August 2020 20:10 UTC](https://discourse.nodered.org/t/data-in-csv-to-email/32195/1 "2020-08-29T20:10:50Z")

</div>

am trying to get my datas into csv file and send it to email!  
can anyone give me a flow of that

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [29 August 2020 20:21 UTC](https://discourse.nodered.org/t/data-in-csv-to-email/32195/2 "2020-08-29T20:21:32Z")

</div>

Given the amount of info you have provided I would suggest a csv node followed by an email out node.

---

<div class="post-metadata">

**Author:** ![tadi](https://avatars.discourse-cdn.com/v4/letter/t/9f8e36/32.png) [@tadi](https://discourse.nodered.org/u/tadi)\
**Post date:** [29 August 2020 20:22 UTC](https://discourse.nodered.org/t/data-in-csv-to-email/32195/3 "2020-08-29T20:22:44Z")

</div>

Well i have an s7node to read datas from my plc... so i want to hold these datas into csv file and send to email

---

<div class="post-metadata">

**Author:** ![tadi](https://avatars.discourse-cdn.com/v4/letter/t/9f8e36/32.png) [@tadi](https://discourse.nodered.org/u/tadi)\
**Post date:** [29 August 2020 20:25 UTC](https://discourse.nodered.org/t/data-in-csv-to-email/32195/5 "2020-08-29T20:25:17Z")

</div>

[flows (4).json](https://discourse.nodered.org/uploads/short-url/fydnBo9D17H0CCLMbTvogFYBjnz.json) (7.4 KB)  
here is my flow

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [29 August 2020 20:30 UTC](https://discourse.nodered.org/t/data-in-csv-to-email/32195/6 "2020-08-29T20:30:22Z")

</div>

You can paste the flow in here directly, using the `</>` button.

---

<div class="post-metadata">

**Author:** ![tadi](https://avatars.discourse-cdn.com/v4/letter/t/9f8e36/32.png) [@tadi](https://discourse.nodered.org/u/tadi)\
**Post date:** [29 August 2020 20:32 UTC](https://discourse.nodered.org/t/data-in-csv-to-email/32195/7 "2020-08-29T20:32:23Z")

</div>

```auto
[{"id":"ff4435a0.6d6c88","type":"tab","label":"Power","disabled":false,"info":""},{"id":"3faf165e.1fe6aa","type":"ui_text","z":"ff4435a0.6d6c88","group":"7ab6a5e9.a7585c","order":2,"width":9,"height":1,"name":"","label":"Reactive Power / L1 (KVAR) :","format":"{{msg.payload}}","layout":"row-spread","x":520,"y":320,"wires":[]},{"id":"d3ff16cd.2489a8","type":"ui_text","z":"ff4435a0.6d6c88","group":"ed18524d.8e34","order":1,"width":9,"height":1,"name":"","label":"Active Power / L1 (Kw) :","format":"{{msg.payload}}","layout":"row-spread","x":510,"y":100,"wires":[]},{"id":"287a3989.2c23c6","type":"ui_text","z":"ff4435a0.6d6c88","group":"ed18524d.8e34","order":2,"width":9,"height":1,"name":"","label":"Active Power / L2 (Kw) :","format":"{{msg.payload}}","layout":"row-spread","x":510,"y":140,"wires":[]},{"id":"15b37ddd.56ab22","type":"ui_text","z":"ff4435a0.6d6c88","group":"ed18524d.8e34","order":3,"width":9,"height":1,"name":"","label":"Active Power / L3 (Kw) :","format":"{{msg.payload}}","layout":"row-spread","x":510,"y":180,"wires":[]},{"id":"2f7bf826.35c928","type":"ui_text","z":"ff4435a0.6d6c88","group":"7ab6a5e9.a7585c","order":1,"width":9,"height":1,"name":"","label":"Reactive Power / L2 (KVAR) :","format":"{{msg.payload}}","layout":"row-spread","x":520,"y":360,"wires":[]},{"id":"c0d30ff4.765bb","type":"ui_text","z":"ff4435a0.6d6c88","group":"7ab6a5e9.a7585c","order":3,"width":9,"height":1,"name":"","label":"Reactive Power / L3 (KVAR) :","format":"{{msg.payload}}","layout":"row-spread","x":520,"y":400,"wires":[]},{"id":"57b69970.e47be8","type":"ui_chart","z":"ff4435a0.6d6c88","name":"","group":"ed18524d.8e34","order":5,"width":9,"height":5,"label":"Active Power","chartType":"line","legend":"true","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"0","ymax":"50","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":470,"y":220,"wires":[[]]},{"id":"e33c48e8.cfef48","type":"ui_chart","z":"ff4435a0.6d6c88","name":"","group":"7ab6a5e9.a7585c","order":5,"width":9,"height":5,"label":"Reactive Power","chartType":"line","legend":"true","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"0","ymax":"30","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":480,"y":440,"wires":[[]]},{"id":"2f6cb738.9d0ce8","type":"ui_text","z":"ff4435a0.6d6c88","group":"8446d071.daa45","order":3,"width":9,"height":1,"name":"","label":"Apparent Power / L1 (KVAR) :","format":"{{msg.payload}}","layout":"row-spread","x":530,"y":560,"wires":[]},{"id":"50f15939.f29028","type":"ui_text","z":"ff4435a0.6d6c88","group":"8446d071.daa45","order":1,"width":9,"height":1,"name":"","label":"Apparent Power / L2 (KVAR) :","format":"{{msg.payload}}","layout":"row-spread","x":530,"y":600,"wires":[]},{"id":"86fdb3f3.39c69","type":"ui_text","z":"ff4435a0.6d6c88","group":"8446d071.daa45","order":2,"width":9,"height":1,"name":"","label":"Apparent Power / L3 (KVAR) :","format":"{{msg.payload}}","layout":"row-spread","x":530,"y":640,"wires":[]},{"id":"e11d6e6e.42c19","type":"ui_chart","z":"ff4435a0.6d6c88","name":"","group":"8446d071.daa45","order":5,"width":9,"height":5,"label":"Apparent Power","chartType":"line","legend":"true","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"0","ymax":"50","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":480,"y":680,"wires":[[]]},{"id":"4f380e5c.947a1","type":"s7 in","z":"ff4435a0.6d6c88","endpoint":"5fd9fbc4.ee2b04","mode":"single","variable":"Active Power A","diff":true,"name":"","x":180,"y":100,"wires":[["d3ff16cd.2489a8","57b69970.e47be8"]]},{"id":"bec944e0.fa5878","type":"s7 in","z":"ff4435a0.6d6c88","endpoint":"5fd9fbc4.ee2b04","mode":"single","variable":"Active Power B","diff":true,"name":"","x":180,"y":160,"wires":[["287a3989.2c23c6","57b69970.e47be8"]]},{"id":"a43e6647.29a088","type":"s7 in","z":"ff4435a0.6d6c88","endpoint":"5fd9fbc4.ee2b04","mode":"single","variable":"Active Power C","diff":true,"name":"","x":180,"y":220,"wires":[["15b37ddd.56ab22","57b69970.e47be8"]]},{"id":"5ef0f1c4.0185a","type":"s7 in","z":"ff4435a0.6d6c88","endpoint":"5fd9fbc4.ee2b04","mode":"single","variable":"Reactive Power A","diff":true,"name":"","x":190,"y":320,"wires":[["3faf165e.1fe6aa","e33c48e8.cfef48"]]},{"id":"298e5da7.57e042","type":"s7 in","z":"ff4435a0.6d6c88","endpoint":"5fd9fbc4.ee2b04","mode":"single","variable":"Reactive Power B","diff":true,"name":"","x":190,"y":380,"wires":[["2f7bf826.35c928","e33c48e8.cfef48"]]},{"id":"53d2a44a.04948c","type":"s7 in","z":"ff4435a0.6d6c88","endpoint":"5fd9fbc4.ee2b04","mode":"single","variable":"Reactive Power C","diff":true,"name":"","x":190,"y":440,"wires":[["c0d30ff4.765bb","e33c48e8.cfef48"]]},{"id":"98ada1c6.4a1c8","type":"s7 in","z":"ff4435a0.6d6c88","endpoint":"5fd9fbc4.ee2b04","mode":"single","variable":"Apparent Power A","diff":true,"name":"","x":190,"y":560,"wires":[["2f6cb738.9d0ce8","e11d6e6e.42c19"]]},{"id":"3d1647ed.9539a8","type":"s7 in","z":"ff4435a0.6d6c88","endpoint":"5fd9fbc4.ee2b04","mode":"single","variable":"Apparent Power B","diff":true,"name":"","x":190,"y":620,"wires":[["50f15939.f29028","e11d6e6e.42c19"]]},{"id":"a7e34005.0a06b","type":"s7 in","z":"ff4435a0.6d6c88","endpoint":"5fd9fbc4.ee2b04","mode":"single","variable":"Apparent Power C","diff":true,"name":"","x":190,"y":680,"wires":[["86fdb3f3.39c69","e11d6e6e.42c19"]]},{"id":"7ab6a5e9.a7585c","type":"ui_group","z":"","name":"Reactive Power","tab":"eeea01e8.f258b","order":2,"disp":true,"width":"9","collapse":false},{"id":"ed18524d.8e34","type":"ui_group","z":"","name":"Active Power","tab":"eeea01e8.f258b","order":1,"disp":true,"width":"9","collapse":false},{"id":"8446d071.daa45","type":"ui_group","z":"","name":"Apparent Power","tab":"eeea01e8.f258b","order":3,"disp":true,"width":9,"collapse":false},{"id":"5fd9fbc4.ee2b04","type":"s7 endpoint","z":"","transport":"iso-on-tcp","address":"192.168.1.3","port":"102","rack":"0","slot":"1","localtsaphi":"01","localtsaplo":"00","remotetsaphi":"01","remotetsaplo":"00","connmode":"rack-slot","adapterauto":true,"adapterport":"","busaddr":"2","adapteraddr":"0","cycletime":"500","timeout":"1500","verbose":"default","name":"s7 1200 data read","vartable":[{"addr":"DB3,R0","name":"Courant L1"},{"addr":"DB3,R4","name":"Courant L2"},{"addr":"DB3,R8","name":"Courant L3"},{"addr":"DB3,R16","name":"L1-L2"},{"addr":"DB3,R20","name":"L2-L3"},{"addr":"DB3,R24","name":"L3-L1"},{"addr":"DB3,R32","name":"L1-N"},{"addr":"DB3,R36","name":"L2-N"},{"addr":"DB3,R40","name":"L3-N"},{"addr":"DB3,R48","name":"Active Power A"},{"addr":"DB3,R52","name":"Active Power B"},{"addr":"DB3,R56","name":"Active Power C"},{"addr":"DB3,R64","name":"Reactive Power A"},{"addr":"DB3,R68","name":"Reactive Power B"},{"addr":"DB3,R72","name":"Reactive Power C"},{"addr":"DB3,R80","name":"Apparent Power A"},{"addr":"DB3,R84","name":"Apparent Power B"},{"addr":"DB3,R88","name":"Apparent Power C"}]},{"id":"eeea01e8.f258b","type":"ui_tab","z":"","name":"Puissances","icon":"dashboard","order":2,"disabled":false,"hidden":false}]

```

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [30 August 2020 09:10 UTC](https://discourse.nodered.org/t/data-in-csv-to-email/32195/8 "2020-08-30T09:10:24Z")

</div>

So that is a bunch of input nodes feeding into dashboard nodes... all good.  
But we still have no idea what the csv should look like? How and when it should be sent?  
You will probably want to use the join node to join all the messages into one object using their topics to identify them, and then maybe feed a csv and then the email... but that would just send all the time... probably not what you want.

---

<div class="post-metadata">

**Author:** ![tadi](https://avatars.discourse-cdn.com/v4/letter/t/9f8e36/32.png) [@tadi](https://discourse.nodered.org/u/tadi)\
**Post date:** [30 August 2020 12:55 UTC](https://discourse.nodered.org/t/data-in-csv-to-email/32195/9 "2020-08-30T12:55:01Z")

</div>

All i want is to to get every 15min the file contain name of intput and the value thats it

---

<div class="post-metadata">

**Author:** ![tadi](https://avatars.discourse-cdn.com/v4/letter/t/9f8e36/32.png) [@tadi](https://discourse.nodered.org/u/tadi)\
**Post date:** [30 August 2020 14:36 UTC](https://discourse.nodered.org/t/data-in-csv-to-email/32195/10 "2020-08-30T14:36:24Z")

</div>

No one can help me?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [30 August 2020 14:48 UTC](https://discourse.nodered.org/t/data-in-csv-to-email/32195/11 "2020-08-30T14:48:59Z")

</div>

How have you got on with @dceejay's suggestion to use the Join node to get them all into one message. You can find an example of this in this cookbook flow.  
[https://cookbook.nodered.org/basic/join-streams](https://cookbook.nodered.org/basic/join-streams)

---

<div class="post-metadata">

**Author:** ![tadi](https://avatars.discourse-cdn.com/v4/letter/t/9f8e36/32.png) [@tadi](https://discourse.nodered.org/u/tadi)\
**Post date:** [30 August 2020 14:50 UTC](https://discourse.nodered.org/t/data-in-csv-to-email/32195/12 "2020-08-30T14:50:49Z")

</div>

ok with that but am a beginner in this and i need a a flow to inderstand

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [30 August 2020 15:21 UTC](https://discourse.nodered.org/t/data-in-csv-to-email/32195/13 "2020-08-30T15:21:59Z")

</div>

In that case start by watching the excellent node red essentials videos. I think they are linked from the node red getting started guide.  
Then you can import the flow from the cookbook and experiment to see how it works.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [29 October 2020 15:22 UTC](https://discourse.nodered.org/t/data-in-csv-to-email/32195/14 "2020-10-29T15:22:06Z")

</div>

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