# Pre-populated flows tab for new installations

**URL:** <https://discourse.nodered.org/t/pre-populated-flows-tab-for-new-installations/92800>\
**Category:** General\
**Created:** [30 October 2024 15:34 UTC](https://discourse.nodered.org/t/pre-populated-flows-tab-for-new-installations/92800 "2024-10-30T15:34:11Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![37Rb](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/37rb/32/101128_2.png) [@37Rb](https://discourse.nodered.org/u/37Rb)\
**Post date:** [30 October 2024 15:34 UTC](https://discourse.nodered.org/t/pre-populated-flows-tab-for-new-installations/92800/1 "2024-10-30T15:34:11Z")

</div>

I'm putting together a software package that includes Node-RED and I would like to have a flows tab populated with pre-configured nodes that the user can copy/paste into their flows. What is the best/safest way to do that?

The seemingly obvious thing to is to include a default flows.json file that has the sample tab. Is that safe to do? I don't want to mess up installations as new version of Node-RED are released that might change the flows file. Is there a more appropriate way to do this?

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [30 October 2024 17:06 UTC](https://discourse.nodered.org/t/pre-populated-flows-tab-for-new-installations/92800/2 "2024-10-30T17:06:42Z")

</div>

A pre-populated flows file is probably the safest and easiest option.

Even if we introduce a new file format, we'll still support the existing format for backward compatibility.

---

<div class="post-metadata">

**Author:** ![37Rb](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/37rb/32/101128_2.png) [@37Rb](https://discourse.nodered.org/u/37Rb)\
**Post date:** [30 October 2024 19:59 UTC](https://discourse.nodered.org/t/pre-populated-flows-tab-for-new-installations/92800/3 "2024-10-30T19:59:18Z")

</div>

The default flows file would be generated dynamically from hardware discovery. Are there any rules I need to follow when generating IDs for tabs and nodes? Or is it just random 16-character strings?

---

<div class="post-metadata">

**Author:** ![gregorius](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gregorius/32/73816_2.png) [@gregorius](https://discourse.nodered.org/u/gregorius)\
**Post date:** [30 October 2024 20:19 UTC](https://discourse.nodered.org/t/pre-populated-flows-tab-for-new-installations/92800/4 "2024-10-30T20:19:53Z")

</div>

> [@37Rb](#):
>
> Or is it just random 16-character

Seems to be [random 16 hexadecimal](https://github.com/node-red/node-red/blob/42382e1a03c0ab5a58fdb5b0eed7f539686b35a5/packages/node_modules/%40node-red/util/lib/util.js#L39C1-L50C2) (that's backend) and [this is frontend](https://github.com/node-red/node-red/blob/42382e1a03c0ab5a58fdb5b0eed7f539686b35a5/packages/node_modules/%40node-red/editor-client/src/js/nodes.js#L594-L600) - both do the same.

---

<div class="post-metadata">

**Author:** ![37Rb](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/37rb/32/101128_2.png) [@37Rb](https://discourse.nodered.org/u/37Rb)\
**Post date:** [30 October 2024 22:10 UTC](https://discourse.nodered.org/t/pre-populated-flows-tab-for-new-installations/92800/5 "2024-10-30T22:10:32Z")

</div>

Works like a charm. Thanks!!!

---

<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:** [13 November 2024 22:10 UTC](https://discourse.nodered.org/t/pre-populated-flows-tab-for-new-installations/92800/6 "2024-11-13T22:10:51Z")

</div>

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