# Sending DashBoard Chart data as image to E-mail?

**URL:** <https://discourse.nodered.org/t/sending-dashboard-chart-data-as-image-to-e-mail/80834>\
**Category:** General\
**Tags:** node-red-dashboard\
**Created:** [27 August 2023 08:00 UTC](https://discourse.nodered.org/t/sending-dashboard-chart-data-as-image-to-e-mail/80834 "2023-08-27T08:00:36Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Soiski](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/soiski/32/88848_2.png) [@Soiski](https://discourse.nodered.org/u/Soiski)\
**Post date:** [27 August 2023 08:00 UTC](https://discourse.nodered.org/t/sending-dashboard-chart-data-as-image-to-e-mail/80834/1 "2023-08-27T08:00:36Z")

</div>

Hi, As so many others these days I'm following NordPool energy prices on my Node Red. Reading data, manipulating it to find cheap periods and action based on it I have managed to do. Also sending a simple E-mail stating some of the facts in plain text mode I have been successful but stumbled to part that I can not do nor find solution. Sending the chart data/image or other visual elements via Email.

Two options that I was looking for solution:

> **[node-red-contrib-web-page-screenshot](https://flows.nodered.org/node/node-red-contrib-web-page-screenshot)**
>
> A Node-RED node for taking screenshots of web pages.

This does not seem to work inside (fetching Node Red pages; externally web pages all OK). Not sure why and you can see there similar discussion on the pages, but seems that the author has gone silent months ago.

The second that I was looking :

[![](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/e/2e560ff15cca1ec0eb7e4e161634c184791d4c63.jpeg "Generate chart images in Node-Red for email or chat messages") ](https://www.youtube.com/watch?v=bF-Q-LW5HsY)

Looks something that could achieve it, but fairly complicated way (at least for my skill set still at this point)

So in short has any one master this and what was the way you would go about it ?

Thansk in advance for all the great ideas 🙂

---

<div class="post-metadata">

**Author:** ![M-a-r-t-i-n](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/m-a-r-t-i-n/32/52391_2.png) [@M-a-r-t-i-n](https://discourse.nodered.org/u/M-a-r-t-i-n)\
**Post date:** [27 August 2023 10:41 UTC](https://discourse.nodered.org/t/sending-dashboard-chart-data-as-image-to-e-mail/80834/2 "2023-08-27T10:41:51Z")

</div>

Hello.

I seldom need to send charts via telegram, email etc.. but when I do I use the free version of [www.quickchart.io](http://www.quickchart.io)

You create a url describing your chart, request it from them and you’re sent back a jpeg of your requested chart, i then just save it and send it.

They have lots of documentation and examples on their web pages.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [27 August 2023 12:56 UTC](https://discourse.nodered.org/t/sending-dashboard-chart-data-as-image-to-e-mail/80834/3 "2023-08-27T12:56:16Z")

</div>

Or without using an external service: [node-red-contrib-chart-image (node) - Node-RED](https://flows.nodered.org/node/node-red-contrib-chart-image)

---

<div class="post-metadata">

**Author:** ![M-a-r-t-i-n](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/m-a-r-t-i-n/32/52391_2.png) [@M-a-r-t-i-n](https://discourse.nodered.org/u/M-a-r-t-i-n)\
**Post date:** [27 August 2023 13:34 UTC](https://discourse.nodered.org/t/sending-dashboard-chart-data-as-image-to-e-mail/80834/4 "2023-08-27T13:34:52Z")

</div>

That plugin was described and used in the youtube video., but the OP seemed reticent to use it, so I just offered an alternative.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [27 August 2023 13:43 UTC](https://discourse.nodered.org/t/sending-dashboard-chart-data-as-image-to-e-mail/80834/5 "2023-08-27T13:43:15Z")

</div>

Oh, was it?

TBF: the OP did not mention it and i aint gonna watch a 20 min youtube video 🤷‍♂️

---

<div class="post-metadata">

**Author:** ![Soiski](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/soiski/32/88848_2.png) [@Soiski](https://discourse.nodered.org/u/Soiski)\
**Post date:** [27 August 2023 15:34 UTC](https://discourse.nodered.org/t/sending-dashboard-chart-data-as-image-to-e-mail/80834/6 "2023-08-27T15:34:58Z")

</div>

Sorry, should have mentioned the node He is using in the video. I asked the video author for a sample where the chart is actually reading data from the flows (In His samples He is generating some random data inside the function only) as I'm having problem to understand the node function.

---

<div class="post-metadata">

**Author:** ![Soiski](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/soiski/32/88848_2.png) [@Soiski](https://discourse.nodered.org/u/Soiski)\
**Post date:** [27 August 2023 15:35 UTC](https://discourse.nodered.org/t/sending-dashboard-chart-data-as-image-to-e-mail/80834/7 "2023-08-27T15:35:48Z")

</div>

Thanks , this seems to be novel idea, but as Steve-Mcl point I would like to keep it "in house".

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [27 August 2023 15:39 UTC](https://discourse.nodered.org/t/sending-dashboard-chart-data-as-image-to-e-mail/80834/8 "2023-08-27T15:39:24Z")

</div>

> [@Soiski](#):
>
> I'm having problem to understand the node function.

where is this function? can you paste a copy here?

Where does your data come form - can you provide a sample?

---

<div class="post-metadata">

**Author:** ![Soiski](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/soiski/32/88848_2.png) [@Soiski](https://discourse.nodered.org/u/Soiski)\
**Post date:** [28 August 2023 15:45 UTC](https://discourse.nodered.org/t/sending-dashboard-chart-data-as-image-to-e-mail/80834/9 "2023-08-28T15:45:02Z")

</div>

This is the data I'm putting at the moment on the "future electricity price chart"

```auto
[{"id":"d19dd318821fdbc5","type":"inject","z":"3d738ea.22f7872","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"60","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":171,"y":123,"wires":[["cfa7a40afae56a43"]]},{"id":"cfa7a40afae56a43","type":"function","z":"3d738ea.22f7872","name":"date = tomorrow","func":"let today = new Date();\nlet tomorrow = today.setDate(today.getDate() + 1);\nmsg.date = tomorrow\nreturn msg;","outputs":1,"noerr":0,"x":369.19998931884766,"y":188.19999599456787,"wires":[["1c0a540d20e55828"]]},{"id":"1c0a540d20e55828","type":"nordpool-api-plus","z":"3d738ea.22f7872","name":"Nordpool_FI","area":"FI","currency":"EUR","x":572.9999389648438,"y":198.99996948242188,"wires":[["bd1203fdc9df5f31"]]},{"id":"bd1203fdc9df5f31","type":"function","z":"3d738ea.22f7872","name":"function 33","func":"var msg1 = {}\nfor (var i = 0; i < msg.payload.length; i++) {\n msg1 = {\n topic: msg.payload[i].currency,\n payload: msg.payload[i].price*1.24/10,\n timestamp: msg.payload[i].timestamp,\n }\n node.send(msg1)\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":765.4000968933105,"y":202.80003261566162,"wires":[["464b6c909c3c3f17"]]},{"id":"464b6c909c3c3f17","type":"ui_chart","z":"3d738ea.22f7872","name":"","group":"ef90abf1.634158","order":1,"width":30,"height":13,"label":"NordPool FI snt / KWh","chartType":"line","legend":"false","xformat":"DD.MM / HH","interpolate":"step","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"604800","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"useDifferentColor":false,"className":"","x":1004.0072021484375,"y":204.3142547607422,"wires":[[]]},{"id":"ef90abf1.634158","type":"ui_group","name":"CT Charts","tab":"b1b2c038.01515","order":3,"disp":false,"width":30,"collapse":false,"className":""},{"id":"b1b2c038.01515","type":"ui_tab","name":"iELEC Current","icon":"fa-plug","order":14,"disabled":false,"hidden":false}]

```

This is the code part the Video Author was showing to populate the chart data

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/c/dc013d5bca8caa70f6d5c59fdbdd251eb407b667.jpeg)

---

<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:** [27 October 2023 15:45 UTC](https://discourse.nodered.org/t/sending-dashboard-chart-data-as-image-to-e-mail/80834/10 "2023-10-27T15:45:07Z")

</div>

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