Link Search Menu Expand Document
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 true or else, it has a list of conditions.

Lesson Outline

  1. Apply Conditional action to the flow
  2. Set condition rule
  3. Apply actions to the conditions

1. Apply Conditional action to the flow

From the right navigation, select the conditional category.

Action Conditional Select

Drag and drop the IF condition to the flow

Action Conditional Select

2. Set condition rule

Select the 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 string value.

Action Conditional Select

Let’s set the target as request/body.

Action Conditional Select

If the target request/body contains a string value “Hello”, the condition is true, otherwise, it is else.

To test the solution, you can use the flow test simulation to mock the request/body.

Action Conditional Select

3. Apply actions to the conditions

In the true part of the IF condition, apply the data/set action.

  • 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”

Action Conditional Select

Download Build Your First Flow Using Conditionals configuration

Learn how to use configuration

NEXT » Lesson 5: Master Loops(Iterations) to Create Complex Solutions