POST request to lookup field

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?

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.

Thank you :slight_smile:
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.

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.)

This topic was solved and automatically closed 15 days after the last reply. New replies are no longer allowed.