Adds menu items to export all subflows as JSON
npm install node-red-plugin-subflow-exporterExport exactly what you need — selected flows (tabs) and/or subflows — in one JSON file, straight from the editor. Adds a “Subflow exporter” sidebar with checkboxes, quick select actions, and an Export button.
---
* No bulk export in UI. Node-RED lets you export nodes/flows one by one. That’s slow and error-prone for large workspaces.
* Subflow completeness. Copying only a subflow definition (or only its instances) is not enough; you also need all inner nodes and often related config nodes.
* Selective migration. You often want to move just some flows/subflows (e.g., a feature pack) without dumping the entire workspace.
This plugin:
* Lists all Flows (tabs) and all Subflows with checkboxes.
* Optionally includes referenced subflows and config nodes.
Exports a clean, import-ready JSON you can drop into another Node-RED via Menu → Import*.
---
1. The sidebar uses the editor API to GET /flows.
It supports both API v1 (array) and API v2 ({rev, flows:[…]}).
2. It builds the export from your selections:
* Flow (tab): adds the tab + all nodes with z == tab.id.
* Subflow: adds the subflow definition + all inner nodes with z == subflow.id.
3. Options:
* Auto-include referenced subflows: if selected items contain instances like type: "subflow:, the plugin also includes those subflow definitions and their inner nodes.
* Include all config nodes: adds all config nodes (nodes with no z, excluding tab/subflow), to avoid “missing config” on import.
4. Packages the result into a single JSON and triggers a browser download.
---
* Open the Node-RED editor → right sidebar → “Subflow exporter” tab.
* Controls:
* Export selected (button)
* Refresh (reloads workspace list)
Options: Auto-include referenced subflows, Include all config nodes*
* Two lists with checkboxes:
Flows (tab) — with Select all / None*
Subflows — with Select all / None*
---
``
npm install node-red-plugin-subflow-exporter
`
---
* Node-RED with editor plugins supported.
* Browser session already authenticated if adminAuth is enabled.
* No runtime nodes are installed — this is editor-only.
1. Open Subflow exporter in the sidebar.
2. Click Refresh to load workspace metadata.
3. Tick what you need:
* Flows (tabs)
* Subflows
4. Pick options:
* Auto-include referenced subflows (recommended)
* Include all config nodes (recommended when moving to a new instance)
5. Click Export selected → a file like selected-flows-YYYYMMDD-HHMMSS.json downloads.
6. In the target Node-RED: Menu → Import → paste/upload JSON → Import.
---
* A flat JSON array of Node-RED nodes:
* Selected tab and/or subflow objects,z
* All their inner nodes (matching ),z
* Optional config nodes (no ),
* Optional referenced subflows (definition + inner nodes).
Ready for standard Import* in Node-RED.
---
* Not a workspace backup. It exports only what you tick. For full backups, use your flows.json and credentials strategy.
* Credentials are not exported; manage them separately (env vars, secure storage, or re-enter on target).
* Config nodes: if you skip them and the target lacks the same configs, import may warn about missing references.
* Custom nodes: the target instance must have required node modules installed.
---
* “Nothing selected.” Tick at least one Flow or Subflow.
* “Load failed: …” Check that your editor session can reach GET /flows` (reverse proxy, auth, CORS).
* “Unexpected /flows response shape.” You’re hitting a non-standard response; confirm Node-RED version and any proxies that might rewrite JSON.
Import warnings about missing nodes/config: install the same contrib nodes on the target and/or enable Include all config nodes* before exporting.
---
MIT.