capabilities.work

Upsert a Record

A 4-step recipe with Airtable. We can help you get access.

Recipe · 4 steps

Upsert a Record

Upsert a single record into an Airtable table by a unique key field.

  1. Read the base schema to confirm the target table and key field exist before attempting to read or write records.
  2. Search the table for an existing record where the key field equals the supplied key value, returning at most one match.
  3. Patch the matched record with the supplied fields. Only the fields provided are changed; all other fields on the record are left intact.
  4. Create a new record in the table using the supplied fields when no existing record matched the key value.
What you'll need to have ready
  • baseId: The Airtable base identifier (e.g. appXXXXXXXXXXXXXX).
  • tableIdOrName: The table id or name to upsert the record into.
  • keyField: The field name used to detect an existing record (e.g. "Email").
  • keyValue: The value of the key field to match on.
  • fields: The map of field name/value pairs to write to the record.
For your developer

Arazzo workflow airtable:upsert-record, 4 operations: getBaseSchema → listRecords → updateRecord → createRecords. Specs on APIs.io.