Course 1: Getting started with API AutoFlow
2 min read · 5 min video
Lesson 4: Build Your First Flow Using Conditionals
Now that you have a good grasp of the fundamentals, let’s look at how to create more complex solutions.
The conditionals are statements like IF, Match, the Switch that perform a set of actions when the conditions are met.
If you had any interest in technology, I am sure you have come across the “IF” condition (no pun intended).
“Match” is similar in a way that instead of
else, it has a list of conditions.
Conditionalaction to the
- Set condition rule
- Apply actions to the conditions
right navigation, select the
Drag and drop the
IF condition to the flow
IF action and use the drop-down to set the condition.
In the below example, we are selecting the
string/contains a condition. String/contains checks whether the
target contains a certain
Let’s set the target as
If the target
request/body contains a
string value “Hello”, the condition is
true, otherwise, it is
To test the solution, you can use the
flow test simulation to mock the
true part of the IF condition, apply the
- Make the value “True”
- Make the output as “response/body”
You will notice that since the condition is true, it will execute the action “data/set” to return the value “True”