# Sharing of flows in general, plus as subflows

**URL:** https://discourse.nodered.org/t/sharing-of-flows-in-general-plus-as-subflows/68853
**Category:** General
**Created:** [11 October 2022 10:39 UTC](https://discourse.nodered.org/t/sharing-of-flows-in-general-plus-as-subflows/68853 "2022-10-11T10:39:33Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![bohtho](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bohtho/32/6153_2.png) [@bohtho](https://discourse.nodered.org/u/bohtho)
#### Post date: [11 October 2022 10:39 UTC](https://discourse.nodered.org/t/sharing-of-flows-in-general-plus-as-subflows/68853/1 "2022-10-11T10:39:33Z")

</div>

N8N is often compared and discussed in this forum, but what I find especially nifty about the N8N project is how shared flows look in their forum. They seem to have a simplified editor plugin that takes over the pasted JSONs. It lets you get a quick overview like a somewhat zoomed-out editor view, and you can even click into the nodes, but you still actually copy JSON if you want to see it in your real editor GUI. Just seeing the beginning of a long pasted JSON one-liner gives me very little (hence the existence of the Node-RED editor GUI I presume).

I wonder how much work such a plug-in in the case of the Node-RED editor would be, and how scaled back and quick, yet usable in such a case, it could get.

Related to the topic of “sharing” and the comparisons to N8N is the often touted “more practical nodes” of the latter (for startups and business I assume) but I find those are often just small variations over what is essentially a swagger/openAPI shell. Node-RED has a much larger and much more interesting and varied node library in that regard, but even the aforementioned would quickly not be an issue at all if there was a more integrated, formal and easy way to share and maintain user made subflows, and implicitly making them available, catalogued and installable much like ordinary nodes. Then all those simple openAPI shell nodes would probably get done and added to the catalogue quickly (and once).

I leave it to the reader to (re)adjust how the sharing of a subflow in formats like this forum would then look like (if not just a link to the catalogue, GitHub or npm).

---

<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: [11 October 2022 10:53 UTC](https://discourse.nodered.org/t/sharing-of-flows-in-general-plus-as-subflows/68853/2 "2022-10-11T10:53:53Z")

</div>

> [@bohtho](#):
>
> what I find especially nifty about the N8N project is how shared flows look in their forum

Can you show us an example please?

---

<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: [11 October 2022 11:04 UTC](https://discourse.nodered.org/t/sharing-of-flows-in-general-plus-as-subflows/68853/3 "2022-10-11T11:04:28Z")

</div>

> [@bohtho](#):
>
> easy way to share and maintain user made subflows, and implicitly making them available, catalogued and installable much like ordinary nodes.

We do support publishing subflows as npm modules so they appear in the catalogue just like any other node. It is a bit manual and no doubt improvements could be made to the tooling around it - but the basic capability is there.

> [@bohtho](#):
>
> I wonder how much work such a plug-in in the case of the Node-RED editor would be, and how scaled back and quick, yet usable in such a case, it could get.

Sufficient work that it hasn't been done... yet.

---

<div class="post-metadata">

### Author: ![bohtho](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bohtho/32/6153_2.png) [@bohtho](https://discourse.nodered.org/u/bohtho)
#### Post date: [11 October 2022 11:41 UTC](https://discourse.nodered.org/t/sharing-of-flows-in-general-plus-as-subflows/68853/4 "2022-10-11T11:41:09Z")

</div>

Here’s a screenshot from a mobile view of their discourse:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/7/070d1fb760a91baf205d38646e2c1d05d905ebfd.jpeg)

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [11 October 2022 11:49 UTC](https://discourse.nodered.org/t/sharing-of-flows-in-general-plus-as-subflows/68853/5 "2022-10-11T11:49:30Z")

</div>

That would certainly be a lovely thing to have 🕶 - we just need someone with the skills to build it 😃

In the meantime, we fall back to publishing the exported flow code along with a screenshot.

---

<div class="post-metadata">

### Author: ![bohtho](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bohtho/32/6153_2.png) [@bohtho](https://discourse.nodered.org/u/bohtho)
#### Post date: [11 October 2022 11:50 UTC](https://discourse.nodered.org/t/sharing-of-flows-in-general-plus-as-subflows/68853/6 "2022-10-11T11:50:24Z")

</div>

I know there’s a nodegen project “on the side”, but I was honestly just trying to hype it a bit so we might see it integrated into Node-RED proper, as the intended subflow-making audience isn’t more likely to use a separate CLI tool than the rest.

As a function-node-maximum kind of guy when it comes to javascript, I appreciate all thought and proper coding and work that goes into making NR itself this rock solid and useful.

Also with regard to such a plug-in of course, but I wish to express that I believe it, and the easy subflow-sharing-as-nodes, would be valuable in the building of the community of the future.

(I realise the latter of the two features might open a vast can of worms, I admit I at least can’t see the whole silhouette clearly myself).

---

<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: [11 October 2022 13:22 UTC](https://discourse.nodered.org/t/sharing-of-flows-in-general-plus-as-subflows/68853/7 "2022-10-11T13:22:28Z")

</div>

> [@bohtho](#):
>
> I know there’s a nodegen project

That is different to packaging a subflow as a node.

---

<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: [11 October 2022 14:20 UTC](https://discourse.nodered.org/t/sharing-of-flows-in-general-plus-as-subflows/68853/8 "2022-10-11T14:20:14Z")

</div>

> [@Colin](#):
>
> That is different to packaging a subflow as a node.

err - no it isn't... subflow is one of the types nodegen will take as input.

---

<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: [11 October 2022 14:47 UTC](https://discourse.nodered.org/t/sharing-of-flows-in-general-plus-as-subflows/68853/9 "2022-10-11T14:47:21Z")

</div>

Is nodegen the same as [Packaging a Subflow as a module : Node-RED](https://nodered.org/docs/creating-nodes/subflow-modules)

---

<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: [11 October 2022 15:05 UTC](https://discourse.nodered.org/t/sharing-of-flows-in-general-plus-as-subflows/68853/10 "2022-10-11T15:05:52Z")

</div>

not quite - but does a lot of the basics for you

> **[GitHub - node-red/node-red-nodegen: Command line tool to convert Node-RED...](https://github.com/node-red/node-red-nodegen#example-5-create-an-original-node-from-subflow-definition)**
>
> Command line tool to convert Node-RED function node, Swagger document, or WoT Thing Description to a custom Node. - GitHub - node-red/node-red-nodegen: Command line tool to convert Node-RED functio...

Of course you may/will still want to fully customise it before publishing etc

---

<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: [10 December 2022 15:06 UTC](https://discourse.nodered.org/t/sharing-of-flows-in-general-plus-as-subflows/68853/11 "2022-12-10T15:06:31Z")

</div>

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