Add conditional branches to Tool steps in your Tools
Conditional branching allows users to create different paths in their tool steps based on specific conditions. When you set up a branch, you can define criteria using rules, code, AI prompts, or fallback options. Each branch is assessed independently, meaning multiple branches can run if their conditions are met. This feature enhances the flexibility of your tools, allowing for more complex workflows.
Add a Branch by clicking the button to create a new Tool step, then navigate to the Flow Controls tab to select a Branch
Add new branches by clicking ’+ Add branch’
For each branch, choose the Assessment mode for your branch
Rules: allows you to make a logical assessment between inputs, such as contains, greater than, etc.
Code expression: will run based on whether the code returns true or false
Let AI decide: lets you write a plain text prompt, which returns true or false to run the branch based on your instructions. You can include variables using the variable selector menu.
Include a branch with the Assessment mode set to ‘Fallback’, this means the step will run if no other steps return true.
Add Tool steps to each of your branches, then run the Tool to test
What happens if there's an error in one of the branches?
If there’s an error in any node within a branch, the system will throw an error just like it does with standard Tool steps. It’s important to ensure that each node is functioning correctly to avoid disruptions in your workflow.
How many branches can I have at once?
You can set a maximum of four branches.
Can multiple branches run for one input?
All branches are assessed individually, so multiple branches can run if the assessment returns true.
Can branches access nodes from other branches?
No, nodes within a branch cannot access nodes from different branches. Each branch operates independently, which helps maintain clarity and organisation in your tool’s logic.