Skip to main content

How to: Use AI to extract data and create multiple records with it!

  • November 11, 2025
  • 9 replies
  • 214 views

TheTimeSavingCo
Forum|alt.badge.img+31

Edit: I’d recommend checking out this other guide first, does the same thing without a Run a Script step!



This walkthrough will show you how to:

  1. Use AI to extract data from a text field
  2. Convert that data into an array
  3. Use that array in a Repeating Group to create multiple records in a different table

---

Let’s assume that your goal is to:

  1. Extract the list of hobbies from a text field
  2. Create one record per found hobby in a Hobbies table
  3. Link it back to the triggering record

Here’s what our final result will look like and the example base with the full setup can be found here!

 

Here’s what our set up looks like initially:


 

 

1. Set up your automation trigger

To start with, we’ll create a checkbox field that we’ll use to trigger the automation:

 

Note: How the automation triggers depends on how your data gets created

‘When record updated’ pointed at the text field is going to end up triggering for every character you type into a text field so that won’t work here
As a workaround, we can use a checkbox field to trigger the automation, or if you’re using a form, use the ‘When form submitted’ trigger

 

2. Start your automation with the ‘Generate Text’ step

  1. Select ‘Add action’, then ‘Generate with AI’, followed by ‘Generate text’:
  2. For the prompt, use this:
    1. “Extract the hobbies from the following text, output it as comma separated text”
  3. Add in the text that you want to extract the hobbies from like so:
    1. Your output will end up being ‘horseback riding, water skiing’

 

3. Add a ‘Run script’ action step

 

Here we’re converting the AI’s comma-separated response into an array we can loop over in a repeating group

  1. Start by adding in the Run Script action:
  2. Paste in the following script:
    1. output.set('data', input.config().aiOutput.split(','))
  3. Pass the AI generated text into the script action by adding it as an input variable on the left.  We’ll call it ‘aiOutput’ and select the AI generated response like so:
    1.  

 

4. Test the previous steps so that we can use the Run Script’s output in our Repeating Group:

 

  1. Click on each of the previous actions and click ‘Test step’:

 

5. Add a Repeating Group with the Run Script action’s output as the list:

 

  1. Add a ‘Repeating group’,
  2. Click ‘Select input list’ 
  3. Select the ‘Run Script’ action
  4. Select the ‘data’ output

 

6. Add a Create Record step inside the Repeating Group:

 

  1. Select ‘Create record’
  2. Set the ‘Hobbies’ table
  3. Add the ‘Name’ field and set it to be the ‘Current item’ ‘Array value’
  4. Add the ‘Table 1’ field and set it to be the triggering record’s ID

And you’re done!  Let me know if you have any issues setting it up and I’ll do my best to help!

---

🟢 I’m available for hire!

Reviews  |  Website  | Schedule a call

9 replies

Forum|alt.badge.img+2
  • Participating Frequently
  • November 11, 2025

Hello TheTimeSavingCo!

Thank you for the detailed guide. Unfortunately I can’t pass through because of my subscription limitation. Automation step Run script is allowed for Team plan. 

When I try to use the step the upgrade suggestion appears.

I’m on a trial version of the Team plan and can’t use it (strange, isn’t it?).

Are there any workarounds for the situation?


TheTimeSavingCo
Forum|alt.badge.img+31

Hmm… try pasting the value from the AI action directly into the Hobbies field:

When we paste a string into a linked field like this, Airtable will split it by the commas and for each item it finds, it will:

  1. Link to an existing record with that same primary field value, or
  2. Create a new record if none exists

The catch is that if someone else lists the same hobby, e.g horseback riding, airtable will reuse the existing record instead of creating a fresh one (which is good in some contexts!)

Because the goal here is create one new record per extracted hobby, I’ve updated the prompt to be the following to ensure uniqueness: 
 

Extract the hobbies from the following text, output it as comma separated text.  Prepend each hobby with this ID followed by a " - ": [ID]

[Notes]

The ‘ID’ field is an autonumber field, and in this way we ensure that we create a new Hobby record every time.  The data isn’t as clean but functions as a workaround for being on a Free / Trial Teams plan!


Forum|alt.badge.img+2
  • Participating Frequently
  • November 19, 2025

Hmm… try pasting the value from the AI action directly into the Hobbies field:

When we paste a string into a linked field like this, Airtable will split it by the commas and for each item it finds, it will:

  1. Link to an existing record with that same primary field value, or
  2. Create a new record if none exists

The catch is that if someone else lists the same hobby, e.g horseback riding, airtable will reuse the existing record instead of creating a fresh one (which is good in some contexts!)

Because the goal here is create one new record per extracted hobby, I’ve updated the prompt to be the following to ensure uniqueness: 
 

Extract the hobbies from the following text, output it as comma separated text.  Prepend each hobby with this ID followed by a " - ": [ID]

[Notes]

The ‘ID’ field is an autonumber field, and in this way we ensure that we create a new Hobby record every time.  The data isn’t as clean but functions as a workaround for being on a Free / Trial Teams plan!

Hello Adam!

It works well. Thanks for your recommendation.


Mike_AutomaticN
Forum|alt.badge.img+28

Hey!

This is very similar to what I show in this video below for parsing invoices with AI and generating multiple records (one per line item). Thought it would be a fun use case to share on this post :D

 


Completely different matter, but would love to have you join our Airtable Hackathon! Make sure to sign up!!

Mike, Consultant @ Automatic Nation 
YouTube Channel


Meagan.C
Forum|alt.badge.img
  • New Participant
  • January 24, 2026

Hi, thank you for all the knowledge shared here, it’s been really helpful! I am very new to Scripts, so I’m having trouble extending what’s shared here to suit my use case. I’m organising a homeschool camp and parents submit details via a form. They submit one form entry per family, so each of their children is listed on their form Child 1, Child 2, Child 3, and so on up to Child 6 (only filling in the relevant number of children for their family). For each child, there is a name, age, gender, swimming ability, and friend field - e.g. Child 1 Name, Child 1 Age, Child 1 Gender, Child 1 Swim Ability, Child 1 Friend (for children 1-6).

 

Ultimately, I’d love to automate the extraction of this information to create a separate entry for each child in a new Table called “Groups,’ which I could then sort by age, etc. and manually adjust as needed when I’m organising the camp activity groups. I can run the above-mentioned script for the Name and all other fields individually, but how can I word the AI request and the Script in order to essentially extract everything in one go so the Script generates an entry for each child with all their correct information?

 

In one attempt, I worded the AI prompt to generate all the information for each Child and that worked, but then all the info was grouped and the Script generated an entry that had all the text/info for each child in one field, rather than separated into Name, Age, Gender, etc. fields. Is this possible?

Thank you so much for any assistance!


TheTimeSavingCo
Forum|alt.badge.img+31

Hmm could you provide some screenshots of your table setup and some example data?  Once I know how the data’s set up I’ll be able to help you figure something out!


Meagan.C
Forum|alt.badge.img
  • New Participant
  • January 24, 2026

Thanks ​@TheTimeSavingCo

Here are some screenshots, hopefully that gives you an idea of the set up, but please let me know if you need anything further. 

Essentially I’d be working in two tables - Camp Registrations (where the form data comes in from each family) and Camp Activity Groups (where I’d like each child to have their own record with their details so I can group them appropriately).

 

I’ve included the basic AI text prompt and Create Record example that I tested, just focusing on the Name fields in each form submission. That works well, but I’m hoping, with some help, I can figure out how to run it so that it pulls all Child 1’s info, all Child 2’s info, etc. from Camp Registrations and creates the entries for each child in Camp Activity Groups so that all the relevant information is populated, rather than me manually adding the age, gender, swimming, etc. for each child. Hope that makes sense!

 


TheTimeSavingCo
Forum|alt.badge.img+31

Ahh yeah that’s an interesting one, I’ve just created a new guide that should do what you need and you can find it here!

We can technically do this with just the ‘Generate Text’ step as well and you can find an example of that here

We do this by tweaking the prompt to output JSON, use a ‘Run a script’ action to parse that, and then use the result in a Repeating Group.  It works, but it’s more complicated for the same result, and so the example base is really just an academic thing in case anyone’s curious on how else we can do it


Meagan.C
Forum|alt.badge.img
  • New Participant
  • January 24, 2026

Thanks Adam! I used the guide you linked above and have responded in that thread, it works perfectly. Thank you so much for all your help!