# Automate dashboard contents

**URL:** <https://discourse.nodered.org/t/automate-dashboard-contents/74575>\
**Category:** Dashboard\
**Tags:** node-red-dashboard\
**Created:** [2 February 2023 01:31 UTC](https://discourse.nodered.org/t/automate-dashboard-contents/74575 "2023-02-02T01:31:59Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![Buckskin](https://avatars.discourse-cdn.com/v4/letter/b/b9e5f3/32.png) [@Buckskin](https://discourse.nodered.org/u/Buckskin)\
**Post date:** [3 February 2023 18:03 UTC](https://discourse.nodered.org/t/automate-dashboard-contents/74575/21 "2023-02-03T18:03:23Z")

</div>

> [@bakman2](#):
>
> FYI you can delete multiple at the same time.

Would you explain how. I have tried using `ctl select` & `shift select` but never got anywhere? 🤔

(or point me the direction of the documentation)

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [3 February 2023 18:05 UTC](https://discourse.nodered.org/t/automate-dashboard-contents/74575/22 "2023-02-03T18:05:17Z")

</div>

I am using a mac, I don't how this is mapped in windows (if that is what you are using):

go to config tab, select config node, hold cmd+click on another, then backspace/delete.

---

<div class="post-metadata">

**Author:** ![Marty1982](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marty1982/32/20162_2.png) [@Marty1982](https://discourse.nodered.org/u/Marty1982)\
**Post date:** [3 February 2023 18:08 UTC](https://discourse.nodered.org/t/automate-dashboard-contents/74575/23 "2023-02-03T18:08:01Z")

</div>

Ok...i'm not understing it at all.

Can you upload a flow using your explanation?.

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [3 February 2023 18:10 UTC](https://discourse.nodered.org/t/automate-dashboard-contents/74575/24 "2023-02-03T18:10:47Z")

</div>

I dont have the code anymore.

Just add a template node, write html and add what you need.

---

<div class="post-metadata">

**Author:** ![Marty1982](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marty1982/32/20162_2.png) [@Marty1982](https://discourse.nodered.org/u/Marty1982)\
**Post date:** [3 February 2023 18:28 UTC](https://discourse.nodered.org/t/automate-dashboard-contents/74575/25 "2023-02-03T18:28:23Z")

</div>

Ok, and you say that this template node can be automated from the backend?.

---

<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:** [3 February 2023 22:08 UTC](https://discourse.nodered.org/t/automate-dashboard-contents/74575/26 "2023-02-03T22:08:51Z")

</div>

You would first have to work out what you wanted in the template node, and then write code to take you configuration data and generate the html to put in the template node. I did say it would not be simple.

---

<div class="post-metadata">

**Author:** ![Marty1982](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marty1982/32/20162_2.png) [@Marty1982](https://discourse.nodered.org/u/Marty1982)\
**Post date:** [5 February 2023 03:23 UTC](https://discourse.nodered.org/t/automate-dashboard-contents/74575/27 "2023-02-05T03:23:23Z")

</div>

Ok, did you ever use the nodered API?.

---

<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:** [5 February 2023 07:35 UTC](https://discourse.nodered.org/t/automate-dashboard-contents/74575/28 "2023-02-05T07:35:51Z")

</div>

I thought you were looking at the template node route.

No I have not used the admin API but that is not relevant here.

---

<div class="post-metadata">

**Author:** ![Marty1982](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marty1982/32/20162_2.png) [@Marty1982](https://discourse.nodered.org/u/Marty1982)\
**Post date:** [5 February 2023 15:03 UTC](https://discourse.nodered.org/t/automate-dashboard-contents/74575/29 "2023-02-05T15:03:58Z")

</div>

Yes im using the template node. But the main idea is like this:

html or txt document (google docs or whatever) --\> nodered API to make the post request to the template node --\> end

I mean automate that chain and i think that the NR API is required.

---

<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:** [5 February 2023 15:41 UTC](https://discourse.nodered.org/t/automate-dashboard-contents/74575/30 "2023-02-05T15:41:20Z")

</div>

> [@Marty1982](#):
>
> I mean automate that chain and i think that the NR API is required.

No, you can read the configuration from your document directly into node-red and build the template contents dynamically. Either pass the content to the template node using msg.template, or use angular directives in a fixed template to automate the ui generation.

---

<div class="post-metadata">

**Author:** ![Marty1982](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marty1982/32/20162_2.png) [@Marty1982](https://discourse.nodered.org/u/Marty1982)\
**Post date:** [5 February 2023 21:51 UTC](https://discourse.nodered.org/t/automate-dashboard-contents/74575/31 "2023-02-05T21:51:40Z")

</div>

Ok, i'm confused.

What are the steps to achieve what you say?.

Regards!

---

<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:** [5 February 2023 22:27 UTC](https://discourse.nodered.org/t/automate-dashboard-contents/74575/32 "2023-02-05T22:27:10Z")

</div>

Do what I said in my previous post. Which bit don't you understand.  
Do you know what you need in the UI template node for an example configuration of your system?

---

<div class="post-metadata">

**Author:** ![Marty1982](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marty1982/32/20162_2.png) [@Marty1982](https://discourse.nodered.org/u/Marty1982)\
**Post date:** [6 February 2023 00:22 UTC](https://discourse.nodered.org/t/automate-dashboard-contents/74575/33 "2023-02-06T00:22:23Z")

</div>

That is the point. How should i do it?.

Please if you can upload some example of it.

Regards!

---

<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:** [6 February 2023 08:32 UTC](https://discourse.nodered.org/t/automate-dashboard-contents/74575/34 "2023-02-06T08:32:10Z")

</div>

> [@Marty1982](#):
>
> How should i do it?.

How should you do which part of the solution?

---

<div class="post-metadata">

**Author:** ![Marty1982](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marty1982/32/20162_2.png) [@Marty1982](https://discourse.nodered.org/u/Marty1982)\
**Post date:** [6 February 2023 12:40 UTC](https://discourse.nodered.org/t/automate-dashboard-contents/74575/35 "2023-02-06T12:40:44Z")

</div>

The whole solution.

I mean, you said to read the document directly into node-red and then build the template content dinamically.  
How can you do that?. Explain a little more please.

Thanks

---

<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:** [6 February 2023 13:51 UTC](https://discourse.nodered.org/t/automate-dashboard-contents/74575/36 "2023-02-06T13:51:09Z")

</div>

As I believe I said earlier, I would start by creating a ui\_template node that generates a fixed page that is similar to what you are aiming for. Once that is correct you can move on to making it dynamic.

If you don't know how to build the display in a template node then you need to go on an html/css course.

---

<div class="post-metadata">

**Author:** ![Marty1982](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marty1982/32/20162_2.png) [@Marty1982](https://discourse.nodered.org/u/Marty1982)\
**Post date:** [6 February 2023 14:45 UTC](https://discourse.nodered.org/t/automate-dashboard-contents/74575/37 "2023-02-06T14:45:24Z")

</div>

ok, what is a fixed page?.

---

<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:** [6 February 2023 14:58 UTC](https://discourse.nodered.org/t/automate-dashboard-contents/74575/38 "2023-02-06T14:58:57Z")

</div>

You said you wanted to generate a page dynamically using some config in a file somewhere. First create a static page that is not dynamic that uses html and css to build a web page for an example config. When that is going then you can work out how to build it dynamically.

---

<div class="post-metadata">

**Author:** ![Marty1982](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marty1982/32/20162_2.png) [@Marty1982](https://discourse.nodered.org/u/Marty1982)\
**Post date:** [6 February 2023 15:06 UTC](https://discourse.nodered.org/t/automate-dashboard-contents/74575/39 "2023-02-06T15:06:18Z")

</div>

Ok, i have the static page (dashboard) which is the flow that i've posted before. That step is done.  
The main goal now is to do some automation to inject the html formatted text that i need into the "template node" as this.

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/2/f2c658615c605e36b5d510428bf656c553a81e2b.png)

How can i add information INSIDE the template node from a txt file or another source?. Is that possible?

---

<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:** [6 February 2023 15:17 UTC](https://discourse.nodered.org/t/automate-dashboard-contents/74575/40 "2023-02-06T15:17:57Z")

</div>

> [@Marty1982](#):
>
> i have the static page (dashboard) which is the flow that i've posted before.

That was using the node-red-dashboard. You said you wanted to use a solution generating the page using html and css in a ui\_template node, not using the dashboard.

[Previous page](https://discourse.nodered.org/t/automate-dashboard-contents/74575.md?page=1)

[Next page](https://discourse.nodered.org/t/automate-dashboard-contents/74575.md?page=3)
