Skip to main content

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

  • November 11, 2025
  • 2 replies
  • 55 views

TheTimeSavingCo
Forum|alt.badge.img+31

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!

 

2 replies

Forum|alt.badge.img+2
  • New Participant
  • 4 replies
  • 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
  • Author
  • Brainy
  • 6450 replies
  • November 12, 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!