Reuse logic with subflows
When the same logic shows up in more than one flow — a prompt-cleaning step, a scoring sub-routine, a shared classifier — copy-pasting it means every future fix has to be hunted down in every copy. Subflow extraction turns a chunk of a working flow into its own reusable flow in a single step, and wires it back in as an import.
- Find the logic worth reusing
Look for a run of nodes that does one self-contained job and that you can imagine wanting elsewhere. Good candidates: a normalize-then-classify chain, a formatting step, a guardrail check.
- Select it and extract
Select those nodes on the canvas and choose Extract selection to subflow. In one action, Workbench creates a new flow from the selection, publishes it as its first version, pins it back into the parent as an import, and replaces the selection with a single import node. Nothing about how the parent runs changes — you've just factored the logic out.
- Name it and check its edges
Give the child flow a clear name. Its inputs and outputs are inferred from where your selection connected to the rest of the parent, so the import node drops in with the right ports already wired. Adjust the port names if you want them clearer for the next person who reuses it.
- Reuse it anywhere
The extracted flow is now a normal flow you can import into any other flow in the workspace — open the Imports drawer, add it, and drop its node on the canvas. Fix a bug once in the child, and every flow that imports it picks up the fix by re-pinning.