- 18 Oct 2022
- 7 Minutes to read
Conditional groups of automation actions
- Updated on 18 Oct 2022
- 7 Minutes to read
Automations are powerful customizable trigger-action workflows that work directly within your Airtable base. Conditional groups of automation actions give you the power to incorporate conditional logic into your automation workflows, letting you change the flow of your entire automation based on the results of a previous trigger or action.
You can create sequential groups of automation actions where each group has a condition based on the results of a previous trigger or action.
On an automation run, your automation will go down the line checking each conditional group— if the conditions for a group are met , the automation will run all of the actions in that group.
Only one group of conditions can be met during a single run. Looking at the chart above, if the first set of "if condition(s)" are met, then the actions associated with that will run even if other conditions match in the group of condition(s) below it.
Some examples of where conditional action groups can be helpful (but are not limited to) are:
- The Find records action either returns or doesn’t return records
- If a record isn’t found in your table, you could choose to create a new one.
- Post on different social media channels depending on each record’s values.
- Assign interviewees to different sessions depending on the team they are applying for.
Example workflow 1
For a simplified example of a conditional workflow, imagine you work at a veterinarian’s office, and you need to make sure the incoming animals are sent to the correct vet. You could build something like:
- If: the animal is a cat -> notify the cat vet
- Otherwise, if: the animal is a dog -> notify the dog vet
- Otherwise: this animal is neither a cat nor dog -> so notify the general vet.
Example workflow 2
For a more work-relevant example workflow: Suppose we needed to create an automation to handle assigning projects to the correct person based on the Category of the project.
We have two teams:
- Paris leads the team handling “Brand identity” categorized projects
- Gal leads the team handling “Industrial design” categorized projects.
We built an automation workflow that assigns all “Brand identity” projects to Paris and all “Industrial design” projects to Gal.
If any project doesn’t meet either of those categories, we slack the team—letting them know we need a team lead.
Let’s add one more layer of complexity to our example. Suppose Jeff has a great relationship with the technology team for one of our clients, SwipeSmart. So Jeff will handle all of the “Technology design” categorized projects only if the client is “SwipeSmart.”
We can create and combine two conditions to cover this scenario:
- If “[Category] [is] [Technology design]”, and
- if the “[Client Name] [contains] [SwipeSmart]”.
Now, if a project is submitted from the technology team at SwipeSmart, Jeff will be assigned as the project lead:
Now that we’ve covered a few ideas for building conditional automation workflows let’s dive into how to create and configure conditional groups of actions.
Adding groups of conditional actions
You can add a new group of conditional actions by clicking on the “+” button below the current lowest action in your automation.
If this is your first group of conditional actions, the “+” button will be directly below the “Actions” section:
Clicking on the “Add a conditional group” button will add a new conditional group:
Clicking on the three-dot menu within a conditional group will show a menu to add a new conditional group of actions above or below the current group.
Now that we’ve covered creating conditional groups let’s dive deeper into configuring those groups. Each condition group has a condition (s), name, description, and any automation actions you’ve added to that group.
Configuring conditional action groups
Once you’ve added a group of conditional actions, you can set the condition(s)-that, when met-will cause any actions added to the group to run.
Setting conditions for your group of actions
We’ll quickly go over conditions below, but for a more thorough explanation, check out this support article.
Within conditional action groups, a condition consists of three parts:
- A field or result - A field from the trigger of a previous action step or the result returned from a previous action (e.x. the number of records found).
- An operator - After selecting a field, choose an operator from the pre-populated dropdown menu.
- A value - This is the value you compare all of your records against—using the field you just specified.
You can logically connect conditions together using conjunctions. The two conjunctions available are "And" & "Or":
- You can use "And" when you want all conditions in a group to be met.
- Otherwise, you can "Or" when you'd like any condition in a group to be met.
Configuring a conditional group of actions
Once you’ve added a conditional group of actions, you can configure that group from the “Properties” tab:
You can add and edit conditions for this group underneath the “Conditions” header by clicking the “Add condition” (or “Edit condition”) button:
The first value in any condition you set on a conditional group will always be a field or result from a previous trigger or action in this automation:
Some actions don’t return any data, so you won’t be able to incorporate those actions into your conditions:
After you’ve created at least one conditional group of actions, you will have the option to add a final conditional group (A.K.A the “Otherwise” group). You can add an “Otherwise” group by configuring the “Criteria” to only run the actions in your conditional group, “If no other conditions are met”:
The “Otherwise” group is essentially a catch-all for what to do if none of the previous conditions in your conditional action groups were met. Because the “Otherwise” group will only run if no previous conditions are met, you cannot add new groups below the “Otherwise” group:
After you’ve set up the conditions for your group, you have the option to choose a custom name and description for that conditional group. Adding a name and description for a group can help you tell at a glance what the whole group is doing and why:
Also, make sure you add actions to your conditional group— otherwise, nothing will happen even if the conditions of that group are met!
Once you’ve set up the configuration for your conditional group of automation actions, it’s time to test your configuration .
Testing automations with conditional groups
With automations that include conditional groups, there are three things you need to test:
- Test the automation’s trigger
- Test each individual automation action (above or within your conditional groups)
- The conditions of each conditional group
When you have a conditional group selected, you’ll see a button marked “Test condition.” Clicking that button will test the conditions of that group:
When you test a conditional group, you check that your group will run when the given input testing information matches the conditions for that group. As a reminder, the testing information in an automation comes from a previous trigger or action step.
So effectively, when you test a conditional group, you are double-checking that your conditional group will run with the given input if:
- The condition(s) of that group are met, and
- The given input doesn't match a prior condition group first.
In a successful test, the input record had a category of “Brand Identity,” so the group tested successfully because the actions inside that group would have run.
So, to reiterate, a condition group is testing to see if the group would have run given the input testing information. So, even if your condition is valid— the test may fail if the information that is passed in doesn’t meet the conditions for that group.
In the above example, the input record did not have a category of “Brand Identity,” so this group wouldn’t have been triggered— which is why our test failed.
Removing a group of conditional actions
If your conditional group of actions contains any number of actions, you will not be able to delete it:
To delete a conditional group, delete all the actions in that group before then clicking on the “Delete” button in the menu for that conditional group:
Do conditional actions count towards the total number of 25 actions allowed per automation?
Yes, conditional actions do count toward the total number of actions allowed for each automation.
Can I nest conditions in automations?
We do not currently allow for nesting conditional groups in automations at this time.
Why aren't the date, or time-based, conditions in my conditional logic evaluating correctly?
Automations run on GMT since that is the default timezone that Airtable operates on behind the scenes. When setting up time-based conditions in Automations you may need to adjust times manually or create a formula to auto-adjust times so that the conditions evaluate according to your timezone.
Can multiple automation groups be triggered based on conditions?
No. At this time, only one conditional group's conditions can be met during a run. Consult the note above for more information.