Subgraph on Floyo
14 min
overview subgraphs allow you to group multiple nodes into a single reusable component within a workflow they help reduce visual clutter, improve workflow organization, and make complex workflows easier to maintain instead of managing dozens of individual nodes on the canvas, you can encapsulate related functionality into a subgraph and expose only the inputs and outputs that users need why use subgraphs? subgraphs are useful when a workflow contains repeated node patterns multiple nodes perform a single logical task you want to simplify large workflows you need reusable workflow components you want to provide a cleaner user experience using subgraphs makes workflows easier to understand, share, and maintain creating a subgraph to create 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 will be converted into a single subgraph node on the workflow canvas editing a subgraph after creating 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 organized makes the subgraph easier to use managing inputs inputs determine which settings users can modify without opening the subgraph when configuring inputs expose only the parameters users need to change use clear and descriptive names group related inputs together avoid exposing internal workflow settings example in the video walkthrough, width and height were consolidated into a single location before being exposed through the subgraph interface this reduced duplicate controls and simplified workflow configuration managing outputs outputs allow data generated inside the subgraph to be used elsewhere in the workflow when exposing outputs use descriptive names expose only required outputs remove unused outputs clearly named outputs make larger workflows easier to navigate organizing parameters after creating a subgraph, review all exposed parameters you can reorder inputs rename labels remove unnecessary parameters improve overall usability a well organized parameter panel helps users understand the workflow without inspecting the internal nodes best practices use a single source of truth avoid defining the same value in multiple locations for example, if width and height are already managed by a resize node, consider using that node as the primary source rather than creating additional controls expose only important controls not every parameter needs to be visible expose settings that users are expected to modify frequently and keep implementation details hidden rename inputs clearly avoid generic names such as text input 1 value instead, use names that clearly describe the purpose of the parameter rename outputs clearly users should be able to understand the purpose of an output without opening the subgraph test after creating a subgraph after making changes run the workflow verify all inputs function correctly confirm outputs are generated as expected check that no connections were lost during the conversion process common mistakes exposing too many parameters a subgraph should simplify a workflow, not make it more complicated only expose controls that users need access to keeping duplicate controls avoid configuring the same value from multiple nodes use a single source of truth whenever possible using generic names unclear labels make workflows harder to understand and maintain always rename inputs and outputs before sharing a workflow 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 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
