Question: How to clone a subflow?

Hello,

I recently discovered my love to subflows as they are a very good compromise before rolling out a custom node. Thank you!

But what I didn`t managed is to clone a subflow.

In example I have a nicely configured subflow with parameters, icons, info docs and other things I often like to clone this a a base for a new one. Or I like to do some experiments on a working subflow before placing it back into the production flow. Or I decided later in the development to split a subflow into two because the original contains two functionalities that are more versatile if placed in two different subflows.

Copy paste generates as expected an instance but export import does an instance too. Any hint, perhaps i have to edit / delete an id in the exported json before re-importing it?

1 Like

Hi @Christian-Me

the current way to do it is:

  1. select an instance of the subflow
  2. export it to your clipboard
  3. open the import dialog, paste in the flow json. Edit the name field of the subflow node (it'll be the first one in the json) to something unique. Then import.

The current duplicate detection in the import code assumes you don't want duplicates. Eventually there will be a prompt to ask what to do instead.

1 Like

Precisely what I was looking for, thank you that helped me a lot.

Hi,

These instructions work except that 'Group' and 'Group styling' attributes are not copied as well.

you can manually add the Group afterwards, including the title if needed. Once added, the easiest way is to copy the Group style from one that you prefer (CTRL-SHFT-c) and apply it to the new sub-flow (CTRL-SHFT-c).

Cheers,

Paul