Skip to main content
All CollectionsAutomationsAction library - learn the building blocks of automation templatesFunctions
Action - conditional paths - changing automations when a condition is met
Action - conditional paths - changing automations when a condition is met
Updated over a week ago

Conditional paths can be helpful for automations when we use them with other actions. We will therefore use some practical examples to showcase how you can use conditions.

💡 This action is only available in bulk workflows

Example - terminating a workflow if a condition is not met

We will use the web search action to find news results for the term ‘Shopia’. In the step settings we will select ‘results from the last 7 days’ and to return the ‘Title, description & URL’:

Let’s now add a condition. We’ll create a new step and the select the ‘conditional’ action:

We can then set our condition. The text we want to evaluate is the News results from step 1. We can refer to step 1’s output code as ‘[step_1]’ and we’ll check if any of the titles or descriptions contain the word ‘automations’:

Any steps after step 2 will now be triggered only if the condition in step 2 is met. In this example will add an email notification for when the condition is met. And that’s it we have built our automation:

Example - forking paths - changing automation behaviour if a condition is met

In the first example we terminated the whole workflow when a condition is not met.

We can also create different paths depending on what conditions are met.

Let’s start by defining the first step the same way as in example 1:

For step 2 and 3 we will make these actions both email notification actions:

We can then add a condition to writers 2 and 3 from the 3-dot menus:

We can now define step 2 to run when the condition is met and run step 3 when the condition is not met:

That’s it, you have created a forking path! If you have many steps referencing the same condition, you could alternatively use the ‘condition’ action as we did in example one. However, rather than the ‘then continue’ option we will use the ‘then return true’ option:

We can then set the conditions in steps 3 and 4 like so:

Did this answer your question?