Skip to main content

Script to load multiple records

  • December 29, 2023
  • 1 reply
  • 11 views

Forum|alt.badge.img+4

Greetings!  New to Airtable.

I have a survey table that I need to load blank records (roughly ~120 records for every new survey).

I currently have automations set to add records one by one - it's a major pain.

Is there a way to write a script to (1) load "seed" records from a table in my base and then (2) add them to my survey table?

 

1 reply

Alexey_Gusev
Forum|alt.badge.img+25
Hi
example of script
For numbers more than 50, Array should be splitted by 50 record batches .
You can find example how to do it...  I think, here in search.

 

 

let example = {fields: {'FieldName': "some_value"} } let table=base.getTable('YourTable') let toWrite=Array(40).fill(example) await table.createRecordsAsync(toWrite)