Airtable API Export Help

I wish Parabola had an Airtable export feature, but in the meantime, I’m struggling with the code to allow me to create records in Airtable with multiple associated linked records. I got it to work when there is only a single linked record in a field, but I keep receiving a 422 error code saying “invalid record id” whenever there are multiple linked records. The record ids going into {id (1) (concat)} below are a comma separated string (i.e. recXXXXYYYZZZ, recAAAABBBBCCCC). The code I’m using is below. Thanks for any help that you can provide.

 {
      "fields": {
        "Client": ["{id}"],
        "Timesheet Items": ["{id (1) (concat)}"]
      }
    }
1 Like

Hey Josh - instead of a comma concatenated string, you would want to use quote comma quote, so that it looks like this:

recXXXXYYYZZZ","recAAAABBBBCCCC

And then can be merged into a final format of:

 {
      "fields": {
        "Client": ["{id}"],
        "Timesheet Items": ["recXXXXYYYZZZ","recAAAABBBBCCCC"]
      }
    }

Looks like you also have a space after you comma, so remove that as well!

Thanks for your help!