Condition
Branch your workflow logic
Last updated
Was this helpful?
Branch your workflow logic
Last updated
Was this helpful?
The Condition Step allows you to create branching logic in your workflows, executing different steps based on whether a specified condition evaluates to True
or False
.
A Condition Step acts as a decision point in your workflow, directing the flow based on a JavaScript expression that you define. It consists of:
The Condition: A JavaScript expression that evaluates to either True
or False
True Path: Steps that execute when the condition evaluates to True
(left branch)
False Path: Steps that execute when the condition evaluates to False
(right branch)
Click the "+" button to add a new step in your workflow
Select "Flow" from the categories, then choose "Condition"
In the configuration panel, enter your JavaScript condition
Add steps to both the True and False paths as needed
Conditions are written as JavaScript expressions that evaluate to a boolean value. You can:
Use comparison operators: >, <, >=, <=, ===, !==
Apply logical operators: &&
(AND), ||
(OR), !
(NOT)
Use conditional (ternary) operators: condition ? trueValue : falseValue
Access nested properties: step_2.output.results[0].score > 80
Content branching: Generate different content types based on user input
Error handling: Take alternative actions when a step fails
Quality control: Route content through additional steps if it doesn't meet quality thresholds
This condition will route the workflow through the True path for high-volume keywords and the False path for lower-volume keywords, allowing you to optimize your research process for each scenario.
Keep conditions simple: Complex logic is harder to debug and maintain
Provide default paths: Ensure both True and False paths are configured
Use descriptive names: Rename your condition steps to describe their purpose (e.g., "Check Search Volume")
Test thoroughly: Verify both paths work as expected with different inputs
Condition Steps are powerful tools for creating adaptable workflows that respond intelligently to different scenarios and data conditions.