Can Airtable automations do conditional actions inside loops and support nested loops?
Hi everyone!
I’m working on an automation that needs to create records based on two linked lists, for example:
A list of projects
A list of team members
Question 1:
Is it possible to have an automation that loops over the projects list and, inside that loop, creates records for team members only if the record doesn’t already exist? In other words, can I add a condition inside a repeating loop to check for existing records before creating new ones?
Question 2:
Is it possible to have nested loops in Airtable automations? Or are there any workarounds to loop over both projects and team members together to automatically create every combination without hardcoding?
Thanks so much for your help!
Page 1 / 1
Hmm, for your specific issue, perhaps you could try using a formula field that’ll output ‘[PROJECT]|[TEAM MEMBER NAME]’ and then pasting that into the linked field to the other table? You’d then have an automation on the other table that’ll help you populate the link to the Team Members table:
This relies on the fact that text pasted into linked fields will try to connect to existing records that share the same primary field value, and you’d use an automation to loop through all the projects to paste the formula text in
Is it possible to have an automation that loops over the projects list and, inside that loop, creates records for team members only if the record doesn’t already exist? In other words, can I add a condition inside a repeating loop to check for existing records before creating new ones?
Kinda? We can’t run repeating groups and conditional logic in the same automation, so the closest you’d get is to use a script action inside the repeating group to do this. That is to say, write a script that’ll get run for each Project, and it’ll check the team members list against the already created records list and create it if it doesn’t exist
---
Is it possible to have nested loops in Airtable automations?
Yeah the script workaround again would work here. I also sometimes use two automations for this instead, so the first automation does the initial loop and creates records in a helper table, and then the second automation runs whenever a record gets created in the helper table
@Project_NP_LS
Airtable doesn’t natively offer either of these capabilities, but you can achieve them by writing custom JavaScript code, or by breaking up your automation into multiple different automations. (Additionally, for your #1 question, you can use the workaround mentioned above, but only if your linked record’s primary field isn’t a formula field.)
Make offers thousands of advanced automation features that Airtable’s automations don’t offer, including the ability to integrate with thousands of other apps.
Hey @Project_NP_LS, When you use Airtable Native Loop, It should be the start step of the current automation. It’s only supports parent level looping based on given list. But you can add Script block with in it and then run a looping code with in it.
If there are not a more record to handle then do it all in single Script block without using the Airtable Automation Native Loop block.
Would be ideal to have at least the possibility of having conditional logic AND repeating groups. Repeating groups within repeating groups would be a dream.
Hello @Mike_AutomaticN Hello @dilipborad Hello @ScottWorld and Hello @TheTimeSavingCo
thank you all for your considered thoughts/solutions. In the first instance, I have used the specific Feature Request Form from @Mike_AutomaticN and submitted two separate Feature Requests (see Submitted Requests below)
Let’s see what if anything results from it. In the meantime, I am going to try @ScottWorld’s solution and venture into the world of Make.com. I haven’t used it before, so it is with slight trepidation that I am diving into it. Will see where it takes me.
Thank you all again for your support and feedback.
Best Ladi
SUBMITTED REQUESTS
Feature Request 1: Conditional logic inside repeating groups
I’d love to see the ability to use conditional logic within repeating groups in Airtable Automations.
Here’s a real-world example: I'm building an automation to manage family budgeting. I have:
A list of Budget Types (e.g. Groceries, Travel, Allowance)
A list of Months (all 12)
A list of Beneficiaries (e.g. three named individuals)
The goal is to automatically create a record for every combination of Budget Type × Month × Beneficiary — but only if the record doesn’t already exist.
At the moment:
Airtable lets me loop over a list (e.g. Months)
But it doesn’t allow me to add a condition inside that loop to check for existing records
This means I have to hardcode values or build separate automations, which isn’t scalable
Being able to add conditions inside a repeating group would make automations more powerful and scalable, especially for use cases that involve combinations of dynamic data. It would also reduce reliance on third-party tools like Make.
Feature Request 2: Nested repeating groups (loop inside loop)
I’d love to see the ability to create nested repeating groups in Airtable Automations.
For example, I’m automating a budgeting workflow with:
Budget Types (e.g. Groceries, Travel)
Months (12)
Beneficiaries (3)
Ideally, I would loop through each Budget Type, then for each one loop through Months, then Beneficiaries — creating records for all combinations in a scalable way
Currently, this kind of nested logic requires workarounds or third-party tools like Make, which increases complexity. Nested repeating groups would unlock far more advanced workflows natively within Airtable.
Hi,
To summarize previous anwers, In Airtable Automations you can’t mix Loops and Conditions, and cannot create nested loops. I’m not sure if I understand well about “When you use Airtable Native Loop, It should be the start step of the current automation”, because you can add many steps, including ‘Find Records’ and then use output as list, that’s the typical use case of Repeating Group. But you cannot add steps AFTER loop, so it must be the end of automation. Anyway, this not helps in your case. There are few workarounds, and you can add script to manage all loops conditions etc.
But after you shared your use case, it seems like you are using a wrong tool. Automation designed for simple tasks without user input/output. It’s like a watchdog reacting on data changes, or doing some scheduled tasks.
To execute something complex related to the currently existing data, you have several options. For example, you can create 3 chained automations, like for each Budget create a record with January, and second automation - for each new record with January, create 11 another records with other months, etc… Also, for example, formula which for table and fields name forms command to create a table with that name and fields, single line text.
which you can run in Scripting Extension
Actually I see that most ways are not good for your case, because you need to check existing records. It’s doable by linking if your primary field of destination table is a formula like “Budget | Month | Beneficiares”. But I doubt it’s a solution that looks good. So the only good way is script
well, it looks 90% ready to work, but a bit huge and I don’t like Field names hardcoding in that way. Now it’s really interesting to me - is it possible to code multiply of all possible combination of values in any number of fields? I’ll share the result
Well, that was interesting. 😀
Ready to use from button. Field and table names must be adjusted. Fields must exist in both tables.
const FIELDS = [ 'Budget', 'Months', 'Beneficiary' ] const [source,dest] = ['Tab1','Table2'].map(t=>base.getTable(t)) const query = await dest.selectRecordsAsync({fields: FIELDS }); const exists = new Set(query.records.map(r=>FIELDS.map(f=>r.getCellValue(f).trim()).join('|') )) // Get source record const rec = await input.recordAsync('Select record to process', source); if (!rec) throw new Error('No record selected');
//Review, ask and write console.log({Existing:[...exists.keys()]}) console.log('To review:'); output.table(crt.map(c=>c.fields)) const ask=await input.buttonsAsync(`Total ${values.length} combinations, ${dest.name} has ${exists.size}. Intersection: ${values.length-crt.length}. Create ${crt.length} ?`,['GO', 'Quit']) if (ask != 'GO') throw new Error('Creation cancelled') while (crt.length) await dest.createRecordsAsync(crt.splice(0,50)) output.markdown('> ✅ **Done!**')
Hi All,
Just wanted to say a big thank you to everyone in this community who chimed in on my recent thread (conditional actions inside loops), and a special shout out to @ScottWorld, whose clear advice about using Make for advanced Airtable automations gave me the nudge I have probably needed for a while to step outside of the world of Airtable native automations..
This was my first time using Make, and I’d never written a script before. While the script itself was short (see Script with Helpful Descriptions below) and the scenario conceptually straightforward, I didn’t want to copy and paste blindly. I wanted to understand each step, so that I could actually apply it again and build from it in future.
So over the course of a day and a half, (several hours learning, testing, retesting, and yes, failing a few times too), I finally got there. Thanks to all the suggestions in this forum, I now have a fully working automation that:
Triggers via webhook from Airtable
Retrieves values from a template record
Iterates over months × beneficiaries
Searches another table for existing combinations
Creates new records only if they don’t already exist
Updates the original record with a
Trigger Status (from 🔴 Ready to Run to 🟢 Complete)
Automation Run Date and
Automation Result (✅ Records Created or 📌 Records already existed)
What used to take me 30+ minutes of manual duplication now runs in under 30 seconds — and I’ve finally wrapped my head around iterators, filters, and formulas inside Make.
The trickiest bit was the Search Records formula. I learned (the hard way) that Airtable doesn’t let you search by linked record IDs directly. One needs to:
Add Record_ID () formulas in the original tables
Lookup those values into the target table
In the Search module, use an Airtable formula to match these lookup fields against the corresponding record IDs retrieved earlier in the Make scenario
That fixed it.
I know this sort of thing would take an experienced builder 15 minutes (probably less 😂), but I’m sharing this for anyone who might be in the same position I was in: feeling daunted or unsure where to start. We all learn differently, and sometimes it comes easily, sometimes not. Either way, my biggest takeaway is this: understanding what I have built matters more than how quickly/slowly I get there
Thanks again to all — and especially to @ScottWorld who unknowingly inspired me to step outside of my comfort zone.
Script with Helpful Descriptions
// Get record ID from input const container = input.config() const selectedRecordId = container.recordID
// Build webhook URL with Airtable source tag 🔁 Replace <YOUR_WEBHOOK_URL> with your actual Make webhook URL const webhookUrl = `<YOUR_WEBHOOK_URL>?recordID=${selectedRecordId}&source=airtable`
// Logs the input values received from Airtable console.log("Input container:", container);
// Confirms which record triggered the script console.log("Selected Record ID:", selectedRecordId)
// Shows the final webhook URL being sent console.log("Webhook URL:", webhookUrl)
// Trigger Make scenario await fetch(webhookUrl)
Hi @Project_NP_LS,
Wow, congratulations on your big success with Make!
And thanks so much for the shoutout! I’m so thrilled that I was able to inspire you to go down this path, which enabled you to become a new Make aficionado! 😎🙌
“I don’t want to make it too specific to tasks because I want you to be able to use this logic for many different use cases in your table, not just projects and task management.”
That line really hit home as it unlocked the idea that this was very much a reusable logic pattern, not just for projects and tasks.
In my case, I now use a Template Table and in a single record, there is a combination of
a budget type
source account,
3 beneficiaries, and
all 12 months
When triggered, Make generates 36 child records in the destination table, in a matter of seconds. saving me over 30-40 mins per template record that is triggered.
But here’s the thing, this only works the way it does because I now understand that the template isn’t just a data holder, it’s a blueprint.The structure/architecture of the Template Table drives the entire automation. @Gareth_Pronovos always emphasises how important base schema is, and never have I appreciated and valued it more than in this case
I’m sure most people in the community like @ScottWorld and @Gareth_Pronovos already know this, but for anyone new to this sort of workflow, (like I was and still am), I just wanted to share what I uncovered. Well built/thought out Templates + Make's iterator module = a clean, scalable, elegant way to automate logic, irrespective of its complexity or simplicity.