Help

Re: Parabola API Export Help

932 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Josh_Cyk
5 - Automation Enthusiast
5 - Automation Enthusiast

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)}"]
  }
}
2 Replies 2

Hi @Josh_Cyk - I have a similar base - similar linking fields and, looking at the API doc for this base, I need my fields object to look like this:

  "fields": {
    "Company": [
      "rec123abcdefrte"
    ],
    "Invoice Items": [
      "rec987tyufhHrif",
      "rec13579abcdef",
      "recxyz456YQWE"
    ]
  } 

so, on my invoice items field, adding multiple ids, this is an array of ids, with each id quoted.

I’m not sure I understand your variable "{id (1) (concat)}" but if this is a quoted string of ids (as opposed to string of quoted ids) then this might be the problem.

Can you log out this variable and see what its value is?

JB

Thanks, @JonathanBowen! This worked. Needed a string of quoted ids. I’m not sure how to add the quotes to each id in Parabola, so I used a formula field in Airtable to concatenate quotes around the record id.