Help

Re: POST request to lookup field

2229 2
cancel
Showing results for 
Search instead for 
Did you mean: 
tom_bg
5 - Automation Enthusiast
5 - Automation Enthusiast

Hi

I’m trying to send a POST request to Airtable with two properties: Name (String) and PostedBy (Lookup field).
I keep getting an error unless I remove PostedBy. A new row is created but it is empty.

My json looks like this:

{
  "records": [
    {
      "fields": {
        "Name": "${name}",
        "PostedBy": "${user.id}"
       }
     }
  ]
}

Any Ideas?

5 Replies 5

Lookup fields are not writeable fields. Their data is pulled from another table by a linked record field, so try writing to the linked record field instead. Alternatively, write to the other table which has the original data.

tom_bg
5 - Automation Enthusiast
5 - Automation Enthusiast

Thank you :slightly_smiling_face:
The idea is to create the connection between the new record and an existing record on another table. Is it possible using the API?

Yes, by writing the linked record ID into the linked record field.

tom_bg
5 - Automation Enthusiast
5 - Automation Enthusiast

Hmmm
Is it possible to substitute the ID with a value, like “Name”/UID…?

ie: ‘connect to the row where “[A_COLUMN_VALUE]”=jk549amm23b23t57G’

That would be cool, but as far as I know, that’s not possible with the API, so you’d have to break it up into multiple API calls.

However, you can do that with Integromat, which is a no-code automation platform that enables you to communicate between other apps & Airtable. You can just turn on the “Smart Links” option in Integromat, and then when you type in the name for the Linked Record field, it will automatically substitute the Record_ID for you.

(Note that I am a professional Airtable consultant and a Registered Integromat Partner, and the Integromat link contains my personal referral code.)