Directory structure for flows

I'm beginning a project in which I expect to have many flows. I have not been able to find an option to organize flows in a directory-like structure for easier organization. Is there a reason this hasn't been attempted or is it already possible and I'm missing it?

If there is no option for this currently, I might be interested in submitting a PR if enough people think it's a good idea. I'd love some guidance from the core team on how they would like to see something like this implemented.

1 Like

In my otdm-tools I have some helpers to manage flows as json's. It help you import export flow by flow and that way you can automate it?

in repository you can find otdm-tools directory.
python3, jq, request as depes.

I don't need to import or export them. I'd just like to be able to organize them in Node Red in a simple directory structure. Instead of always seeing all tabs open at once, I'd like to be able to group tabs (flows) into directories and only open a single directory at a time.

1 Like

It's a bit clunky but you can hide flows individually (alt-w) or all but the current flow (no keyboard shortcut assigned, maybe alt-W).
Then shift-ctrl-f lists them and you can click on a hidden flow to unhide it.
You can assign a shortcut (maybe shift-alt-W) to show all flows too.

You can't currently group flows but you can drag related flows next to each other so they show up together in the list.
I wonder if the flow description could somehow be leveraged to group flows. I have no idea what people use this for. There is a Markdown editor with a "Preview" button.
A keyboard shortcut "Hide/show all flows with the same H1 in their description" perhaps.

using otdm-tools:
$ ./otdmTools.py -forceHost localhost -dnrfByUid "*" -oFile '/tmp/flowsListRes.json'
Returns to /tmp/flowsListRes.json json with basic info about flows in localhost. It looks like .....

..........
  },
    {
        "id": "e960dab18be5ba03",
        "type": "tab",
        "label": "mqtt hu to yss",
        "disabled": false,
        "info": "",
        "env": []
    }
]

so by doing:
$ ./otdmTools.py -forceHost localhost -dnrfByUid "e960dab18be5ba03" -oFile '/tmp/flow_e960dab18be5ba03.json'

You will get ready json for later to import.

RTFM of otdm-tools :slight_smile:

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