Help

Airtable Cobuilder is here! Learn more about our new no-code app creation feature, powered by AI on the Airtable Academy

Nested Repeating group in Automation

Topic Labels: Automations
Solved
Jump to Solution
776 6
cancel
Showing results for 
Search instead for 
Did you mean: 
Bharathy
6 - Interface Innovator
6 - Interface Innovator

Hi, 

Table A, B, and C. Table B fields are linked with Table A and Table C. I'm trying to run automation. Whenever a new record is added, I will filter the records from Table A and Table C based on the condition. Then I need to create a record in Table B by linking the data from Table A and Table C. 
Now I can filter the records from Table A and Table C using the Find Records action. but not able to run a nested repeating loop. I can do only one repeating loop.

1 Solution

Accepted Solutions

@shnelp Can you use a "when record meets conditions" trigger instead of "when updated" trigger? Put your binary test in the conditional logic. The automation will only trigger when the record changes from not meeting the condition to meeting the condition.

There are some cases where the "when record meets conditions" won't work--for example, if you need to watch for multiple possible changes, but the conditional logic is unrelated to the fields that you are watching. 

In that case, another option is to use two automations together. The first automation watches for record changes and checks for the binary test. If the record passes the test, set a helper field to trigger the second automation that sends the emails. This second automation also resets the helper field.

Yet another option is to use scripting. Scripting could combine both the conditional logic and the find records actions, and output a list of no records for the loop if the condition is not met.

See Solution in Thread

6 Replies 6
Kyrstin_Graves
7 - App Architect
7 - App Architect

Can you explain what you need the nested repeating loop for?

I'm not sure what table you're watching for new records. I would assume it isn't B because you mention creating a record in B instead of updating the record in B. I'm also not understanding why you'd need a nested repeating loop if its trigger is when you've created a new record. If you could provide more insight, I'd be happy at figuring out a solution for you 🙂

Airtable automations allow for only limited flow control. You can have only one repeating group. If you have conditional actions, you cannot have a repeating group. 

Here are some options.

- Use multiple automations. Have the first automation set a field value (like a checkbox or single select) that triggers the second automation with the nested repeating group.

- Use scripting

- Use a third party automation platform, like Make that supports more complex flow control. 

You don't need any repeated groups here, just usual single update record step. Cannot understand your case that trigger the automation, but that doesn't matter. To link a record in Table B (let's call it Record B) to a number of Records returned by Find Records, you don't need to loop them and add ID of Record B.  Instead, update record B, field 'Link to A' with the result of Find Records in Table A, 'Make a new list of Airtable record ID'.
Do the same for link to table C, don't forget to click on correct 'Find Records' step.

Thanks for the clarification. It would be wonderful to combine both with time. Here's my use case:

- trigger: when a record is updated
- conditional logic: if the record satisfies a binary test
- find records: the people who need to be notified (identified by a binary field in a table of people)
- repeating group: send an email to each person in the group

If there's another way to achieve this goal, I'm happy to learn. I tried inserting the emails of the relevant people as a list in the "To:" field of send email, but that doesn't seem to work.

@shnelp Can you use a "when record meets conditions" trigger instead of "when updated" trigger? Put your binary test in the conditional logic. The automation will only trigger when the record changes from not meeting the condition to meeting the condition.

There are some cases where the "when record meets conditions" won't work--for example, if you need to watch for multiple possible changes, but the conditional logic is unrelated to the fields that you are watching. 

In that case, another option is to use two automations together. The first automation watches for record changes and checks for the binary test. If the record passes the test, set a helper field to trigger the second automation that sends the emails. This second automation also resets the helper field.

Yet another option is to use scripting. Scripting could combine both the conditional logic and the find records actions, and output a list of no records for the loop if the condition is not met.

Thanks, I have done using Script.