Create records out of arrays

Hi! I’m not sure how to go about this and any solution is welcome—I receive through webhooks a field that contains an array separated by commas. These need to be made into records themselves. Depending on the data received, there can be one or 20 values in the array.

Any suggestion on how I can do this? I’m assuming this needs some sort of script, I’m happy as well to be led on what to read so I can learn more on how to do this. Thanks!

This is typically done via a script or an external automation tool like Integromat.

1 Like

@Kevin_Rein_Alvia What you are looking for is automations. There is a trigger called ‘When webhook received’ which will allow you to setup a webhook. Assuming you are passing an array via JavaScript, you can then pass that array as input to a Scripts Action.

Here is the documentation for Airtable Script Actions.

What you will need:

  1. Test the webhook following the instructions on the webhook trigger. (See this for documentation)
  2. Pass the array as an input to the Script Action. (See this for documentation)
  3. Use base.getTable("TABLE_NAME").createRecordsAsync(RECORDS_ARRAY) (See this for documentation)

Of course, if the data that is received by your webhook is not in the proper format, feel free to add a step between 2 and 3 which manipulates the array into the right format.

1 Like

Thank you! This makes sense—will try it out.

This topic was solved and automatically closed 15 days after the last reply. New replies are no longer allowed.