Conditional groups of automation actions
  • 18 Oct 2022
  • 7 Minuten zu lesen
  • Dunkel
    Hell
  • pdf

Conditional groups of automation actions

  • Dunkel
    Hell
  • pdf

The content is currently unavailable in German. You are viewing the default English version.
Article Summary

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.


Prerequisites

We strongly recommend being comfortable with creating new automations and the concept of triggers and actions.


Overview

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.

4418863548823conditionallogicflowchart.png

NOTE

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:

  1. 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.
  2. Post on different social media channels depending on each record’s values.
  3. 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:

  1. If: the animal is a cat -> notify the cat vet
  2. Otherwise, if: the animal is a dog -> notify the dog vet
  3. 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:

  1. Paris leads the team handling “Brand identity” categorized projects
  2. 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.

4414766979223exampleworkflow2.png

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:

  1. If “[Category] [is] [Technology design]”, and
  2. 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:

4414776028055jeffexample.png

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:

4414784016023addcontionalgroup.png

Note
All of the actions above your “Conditional actions” will be triggered every time your automation runs.

Clicking on the “Add a conditional group” button will add a new conditional group:

4414776086295addnewcondiitongroup.gif

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.

4414767095703dropdownAddcondiiton.png

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:

  1. 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).
  2. An operator - After selecting a field, choose an operator from the pre-populated dropdown menu.
  3. A value - This is the value you compare all of your records against—using the field you just specified.

4414776143127condiitondiagram.png

You can logically connect conditions together using conjunctions. The two conjunctions available are "And" & "Or":

  1. You can use "And" when you want all conditions in a group to be met.
  2. 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:

4414767144599groupproperties.png

You can add and edit conditions for this group underneath the “Conditions” header by clicking the “Add condition” (or “Edit condition”) button:

4414767153559addconditions.gif

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:

4414784215831previoustriggeraction.png

Some actions don’t return any data, so you won’t be able to incorporate those actions into your conditions:4414767168023noactionoutput.png

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

4414784241047otherwisegroup.png

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:

4414776215831otherwisefinalgroup.png

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:

4414784288151nameanddescription.png

Also, make sure you add actions to your conditional group— otherwise, nothing will happen even if the conditions of that group are met!

4414776260631emptynoactions.jpg

Once you’ve set up the configuration for your conditional group of automation actions, it’s time to test your configuration .

Note
The “Find Records” action is a perfect use case for conditional groups. You can define a condition based on a previous “Find records” action and then do something different depending on how many records were found.


Testing automations with conditional groups

With automations that include conditional groups, there are three things you need to test:

  1. Test the automation’s trigger
  2. Test each individual automation action (above or within your conditional groups)
  3. The conditions of each conditional group
Note
You still need to test the individual actions within your conditional groups to ensure they run as expected.

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:

4414776374167testcondition.png

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:

  1. The condition(s) of that group are met, and
  2. 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.

4414784523927failedtestvalidconditions.png

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:

4414767388439groupmustbeemptytodelete.png

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:

4414776490519emptyanddelete.gif


FAQs

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.


War dieser Artikel hilfreich?