Skip to main content

Hi everyone!

I’m working on a workflow in Airtable where I want to automatically generate rows in a second table (CostComponents) based on new or updated records in a first table (Employees).

In my specific use case, I want to create a predefined set of rows depending on the “Resource Type” of an employee (“Existing employee”, “New hire”, or “Freelancer”). For example:
    •    For “Existing employee” → generate 16 rows
    •    For “New hire” → generate a different set of rows
    •    For “Freelancer” → generate yet another set of rows

Each generated row has static fields like “Cost Component”, “FTE”, and other data pulled from the Employees record.

I’m currently using Airtable Automations with “When record created” and “When record updated” triggers, combined with a Run script action. The script seems to run, but doesn’t create the rows. I’m curious:
    •    Is this the best (or most scalable) approach?
    •    Are there other ways to handle this kind of row-generation logic within Airtable itself (without relying heavily on scripting, or minimizing duplication)?
    •    How would you structure the data so that monthly budgeting amounts (which are filled in later) are easy to manage and analyze?

Summary of my use case:
1️⃣ New or updated records in the Employees table should trigger the action
2️⃣ Depending on the Resource Type, a fixed set of rows is created in the CostComponents table
3️⃣ The rows include data like “Company”, “Name”, “Cost Component”, etc.
4️⃣ Monthly budget columns (FY: Oct–Sep) remain empty for later input

Thanks in advance for your insights and recommendations! 😊

Hmm, sounds like record templates might come in handy for this: https://support.airtable.com/docs/using-record-templates-in-airtable

Would be a lot easier to manage creating all the records I think.  Idea would be to create one record template per employee type and set them up accordingly, e.g. for Existing add 16 rows with the appropriate fields filled in.  You could then have an automation that triggers whenever a record gets created / updated and apply the record template


Hi,
Script can give you more flexibility, as long as you understand how it works.
But your task can be done without code. 
I would recommend to create template table with all necessary rows. Table should also contain Resource Type field.
For “Existing employee” →  16 rows
For “New hire” → a different set of rows, etc

In your automation, when this field updated (I suppose you created it as single-select, to be able to choose from several types), you should do ‘Find records’ in Template table, with Condition - match Resource Type. And then run Repeating group looping through results of Find Records. 

You should also consider linking each created record to ‘Initiator’ and add some static data like “Cost Component”, “FTE” as lookups, instead of copying these values. But that depends on your further workflow in 

Example
Template table

Users table


Automation
Note that you should carefully choose the source - if you take data from Employees (Users in my example) you choose data from trigger (When a record updated), and when you take it from template, use ‘Current item’ which loops through Find Records results.
 


So. when we update 2 Users resour​​​​​​​ce types:

 

it links to all new created records in CostComponents

 

new records were created according to template. As you can see, Component can be copied during creation or it can be added as lookup. It’s up to you what to choose, but I would suggest to follow common sense - the first is static, second changed when you change this value in Employee table

 


And by the way, linking is very useful if you need to collect some datas​​​​​​ or status from these records later, you can add Rollups to get summaries per Employee

 

 


Reply