May 01, 2020 10:10 AM
Hey all. I’m tasked with doing some automation of a few processes. As part of this task, I need to create several records in an AirTable base.
I’m using AirtablJS, with typescript typings from DefinitelyTyped. I was wondering how I can create multiple records with one request.
I saw on the API docs that I can just pass an array of field data to the base(“tableName”).create() function to do this. But, when I try it on my codebase, Node complains that create() has no such overload that takes an array of records.
Any advice on doing this?
May 02, 2020 04:33 PM
Wild guess - the SDK you are using (is it this one?) doesn’t support this relatively new API method.
If it is this SDK, notice not a single commit to the project in a half year and I’m pretty sure the API has made leaps and bounds since then.
May 02, 2020 06:41 PM
So, I’d there a newer SDK? Or, am I pretty much stuck with this?
May 03, 2020 02:58 AM
I guess for now I can just iterate over them and send requests like every 200 ms. Kinda Jacky. But it works for now.
May 03, 2020 06:18 AM
Hi Patrick, this is the correct api. And it’s been updated recently.
I think maybe the typescript types hasn’t been, though. So maybe not use that. But the js library definitely supports bulk calls