Conditions

In this video, we will step you through everything you need to know to conditions branching while building an automation using Easyflow.

For this example, we will configure the conditions based on the established year as follows:

  1. If the established year is less than 2019, data will be inserted into Sheet1.

  2. If the established year is equal to 2019, data will be inserted into Sheet2.

  3. If the established year is greater than 2019, data will be inserted into Sheet3.

Before we start configuring the conditional criteria, let's label each branch link. To do this, click on the link and type a label name in the header of the configuration panel.

Let's configure the first conditional criteria by clicking on the first branch link.

  • Using the "4 dots" icon on the left side of the criteria text box, select the established item located in the "step 2" dynamic content group.

  • From the "Math functions" tab, select the less than sign..

  • Then type 2019 inside the criteria text box.

  • The final criteria syntax will be "established less than 2019".

  • Repeat the same configuration for the second and third branch by using the Equals and Greater than operators, respectively.

  • We will now begin testing the various conditional scenarios:

    1. First, set the established year in the initial step to 2019. This means the flow will execute the middle branch and the data will be sent to Sheet2.

    2. Second, set the established year in the initial step to 2010. This means the flow will execute the first branch and the data will be sent to Sheet1.

    3. Third, set the established year in the initial step to 2025. This means the flow will execute the third branch and the data will be sent to Sheet3.

As shown, the conditional cases are working as expected.

Let's take another example where we set a conditional expression in a linear path between the initial and second steps. Assuming our case is to proceed to the next step only if the country is equal to Australia.

  • To configure that, click on the arrow between the first two steps and set the criteria as "country" equals "Australia" then press save.

  • Remember to set the established date back to 2019 in the initial steps.

After running the flow, you can see that the data went to Sheet2 in Google Sheets as expected.

  • Let's change the value of the "country" field to "USA" and run the flow again.

  • We can see that nothing was sent to Google Sheets. This means that none of the steps related to "Google Sheets" were executed.

  • When examining the Executions History from the Workflow visual designer, we can see that only one operation was executed in our last run. This means that only the initial step has been performed.

Thank you for watching this video.

Please feel free to contact us if you have any questions.

Last updated