Subgraphs on Floyo
11 min
subgraphs let you collapse a cluster of nodes into a single, reusable component, cutting visual clutter and making complex workflows far easier to read, share, and maintain this page covers when to use them, how to create and edit them, and the practices that keep them clean overview a subgraph groups multiple nodes into one reusable node on your workflow canvas instead of managing dozens of individual nodes, you encapsulate related functionality and expose only the inputs and outputs people actually need the result cleaner canvases, reusable building blocks, and workflows that are easier for others to understand and run why use subgraphs? subgraphs are a good fit when your workflow has any of these traits repeated node patterns that appear more than once a group of nodes that together perform a single logical task a canvas that's grown large and hard to navigate components you want to reuse across workflows a need to give other users a cleaner, simpler experience tip the core benefit is encapsulation hide the complexity, expose only what matters a good subgraph makes a workflow feel simpler than it actually is under the hood creating a subgraph select the nodes you want to group together right click and choose create subgraph enter a name for the subgraph confirm the creation the selected nodes collapse into a single subgraph node on the canvas editing a subgraph open the subgraph review the generated inputs and outputs reorganize parameters if needed rename inputs and outputs to improve clarity save your changes keeping inputs and outputs tidy here is what makes the subgraph pleasant to use later spend the extra minute now managing inputs inputs determine which settings users can change without opening the subgraph when configuring them expose only the parameters users need to change use clear, descriptive names group related inputs together avoid exposing internal workflow settings example (success style) in the video walkthrough, width and height were consolidated into a single location before being exposed through the subgraph interface this removed duplicate controls and simplified configuration managing outputs outputs let data generated inside the subgraph be used elsewhere in the workflow when exposing them use descriptive names expose only the outputs that are actually needed remove unused outputs clearly named outputs make larger workflows much easier to navigate organizing parameters after creating a subgraph, review every exposed parameter you can reorder inputs rename labels remove unnecessary parameters a well organized parameter panel lets users understand the workflow without ever inspecting the internal nodes best practices practice why it matters use a single source of truth avoid defining the same value in multiple places if width/height are already managed by a resize node, use that node as the source rather than adding duplicate controls expose only important controls not every parameter needs to be visible surface the settings users change often; keep implementation details hidden rename inputs clearly replace generic labels like text input 1 with names that describe the parameter's purpose rename outputs clearly users should understand an output's purpose without opening the subgraph always test run the workflow after creating or modifying a subgraph (see below) test after creating after making changes run the workflow verify all inputs function correctly confirm outputs are generated as expected check that no connections were lost during conversion common mistakes mistake do this instead exposing too many parameters a subgraph should simplify a workflow, not complicate it only expose controls users need keeping duplicate controls don't configure the same value from multiple nodes use a single source of truth using generic names unclear labels make workflows harder to maintain rename inputs and outputs before sharing skipping validation always test the workflow after creating or modifying a subgraph when should you use a subgraph? consider creating a subgraph when a section of your workflow performs a specific, self contained task the same node pattern appears multiple times the workflow has become difficult to navigate you want to simplify the experience for other users subgraphs are one of the most effective ways to keep workflows organized as they grow in size and complexity
