How to set up Branching in a Tool
- 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
Frequently asked questions (FAQs)
What happens if there's an error in one of the branches?
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?
How many branches can I have at once?
You can set a maximum of four branches.
Can multiple branches run for one input?
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?
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.