Help

Re: Automation using both Conditional Logic and Repeating Group

Solved
Jump to Solution
2659 0
cancel
Showing results for 
Search instead for 
Did you mean: 
auekk2787
7 - App Architect
7 - App Architect

I want to make sure I'm not missing something. I have an automation that copies some data columns from one table to another, when a button is clicked on an interface. It does this for batches of data, and I have a checkbox to mark when the automation reviewed a record.

This is easy to setup using the Repeating group feature.

auekk2787_0-1711923006998.png

However, I also now want it to check for duplicates. Rather than creating a new People record, I also want to check if that person exists.

This would require using the Conditional Logic tool in automations. However, I can't seem to use both Conditional Logic and Repeating Group. I'd like to 'Repeat' through every record, then use a Conditional Logic by finding if a match exists.

I'm guessing my only option would be to script this using Javascript in the automation. Is that correct or am I missing something?

 

1 Solution

Accepted Solutions

This is perfect - I simplified this even more. I created 2 automations. Instead of using a checkbox, I made it a single select with 3 options:

  • Automation not run
  • Run automation
  • Automation complete

The first automation is linked to the button, and changes the record status from 'not run' to 'run' using the Repeating Group loop.

The second automation monitors for individual records with a 'run' status. This is where I set up the conditional logic to search for matching records.

See Solution in Thread

5 Replies 5
ScottWorld
18 - Pluto
18 - Pluto

Unfortunately, you are not missing anything. 

Airtable's automations have a ton of limitations, and one of those limitations is that you can't combine repeating groups and conditionals in the same automation. Another limitation is that you can't have more than 50 automations in a base. Another limitation is that each automation can only have up to 24 actions. Another limitation is that you can't actually control who gets notified about automation errors — only one person in an entire company (no matter how large the company is) will get notified about automation errors, and it's the very last person who turned off & on that particular automation. Another limitation is that Airtable will often send "bulk error emails" (i.e. if the automation failed 10 times, it'll only send you one email message telling you about all 10 failures), but that prevents you from jumping directly to the failed run to see what went wrong. Airtable makes it nearly impossible to scroll back in time through the automation run history, because it will only load 10 runs at a time. Scrolling back to just last week's runs could take hours to accomplish. The list of limitations goes on & on.

For your particular problem, if you know how to write Javascript code, you could write your own scripts to work around this problem.

You might also be able to break up your automation into 2 separate automations, but that would require creating an extra table as a "holding tank" for your records to figure out what to do with them. This adds a lot of unnecessary overhead to your base, especially because ANOTHER LIMITATION of Airtable's automations is that you can't delete records (unless you write Javascript code).

Otherwise, most of us in the community have turned to Make's advanced automations & integrations for Airtable for our automations.

Make is a no-code platform that can handle the world's most complex automations, and it can literally do hundreds of thousands of things that you can't do natively in Airtable. And you don't need to know any programming code at all.

Not only would Make solve your existing problem, but it solves all of Airtable's other automation problems as well.

Some people might tell you to use Zapier (which has spent a fortune on advertising in the USA), but those people are inexperienced and/or new to the industry, so they truly don't understand what they are recommending. Zapier is SIGNIFICANTLY more expensive than Make, yet it can only do about 0.1% of what Make can do. I wrote an entire post here comparing Make vs. Zapier.

If you’ve never used Make before, I’ve assembled a bunch of Make training resources in this thread.

For example, here is how you would instantly trigger a Make automation from Airtable.

I also give live demonstrations of how to use Make in many of my Airtable podcast appearances here.

For example, in this video, I show how to work with Airtable arrays in Make.

p.s. If you have a budget for your project and you’d like to hire an expert Airtable consultant to help you with any of this, please feel free to contact me through my website: Airtable consulting — ScottWorld

Yeah you can't use Conditional Logic and Repeating Groups together I'm afraid

A non-Javascript possibility could be creating a "Tasks" table where it'll create one record per item in the list, and you could have another automation that'll trigger per record with the conditional logic perhaps

This is perfect - I simplified this even more. I created 2 automations. Instead of using a checkbox, I made it a single select with 3 options:

  • Automation not run
  • Run automation
  • Automation complete

The first automation is linked to the button, and changes the record status from 'not run' to 'run' using the Repeating Group loop.

The second automation monitors for individual records with a 'run' status. This is where I set up the conditional logic to search for matching records.

I had this exact challenge today and managed to solve it with a very small script that ChatGPT wrote for me in a couple of minutes. I am trying to set country level targets and need to first find the list of all countries, and then review which countries already have targets and create target records for any that are missing.

I used find record actions to first find the list of countries, and then find any existing targets. Paul_Markovits_0-1721827344618.png

I then used these as input variables ("Countries" & "Existing_Countries") to the script. The script outputs a new list called "Filtered_Countries" which I used as the input to the repeating group to create the missing records.

Paul_Markovits_1-1721827432799.png

// Extracting the input variables
let config = input.config();
let Countries = config.Countries;
let Existing_Countries = config.Existing_Countries;

// Filter out the countries that are in Existing_Countries
let Filtered_Countries = Countries.filter(country => !Existing_Countries.includes(country));

// Output the result
console.log("Filtered Countries:", Filtered_Countries);

// Optionally, you can return the filtered countries
output.set('Filtered_Countries', Filtered_Countries);

 This way it's 1 automation and I'm not having to dump the records out to a temporary table. 

Thought I'd share in case others wanted to use the same approach.

Hi @Paul_Markovits,

Thanks for sharing the script, which came in handy to me.

Trouble is, I'm now struggling with yet another obstacle – multiple executions of the same automation at the same time, which leads to data inconsistencies. On the [Decisions] table I added Quentin and Jean-Baptiste almost at the same moment, which led to Quentin being added twice on the [Positions] table for the Decision #1.

JBJ_0-1732570477511.png

JBJ_1-1732570483084.png

I've circumvented this problem with a Make scenario for now. But I'd prefer to keep things within Airtable. So is there a way to force the automation to process its runs sequentially?

Thanks.