Which fields can I merge on?
Up to three fields whose combination is unique in the table, typically the source record id stored in a single-line text field. Linked-record and formula fields cannot be merge fields.
Gerador de upsert
Nomeie tabela, chave e colunas e receba a instrução que o Airtable realmente aceita, com uma guarda para que uma linha antiga nunca sobrescreva uma nova. Abaixo: como a mecânica funciona, o que quebra e como a Datrise carrega o Airtable de forma incremental.
As notas técnicas desta página estão em inglês.
Instrução · PATCH /records with performUpsert
// PATCH https://api.airtable.com/v0/{baseId}/deals
// Authorization: Bearer {personal access token}
{
"performUpsert": {
"fieldsToMergeOn": ["id"]
},
"records": [
{
"fields": {
"id": "…",
"name": "…",
"stage": "…",
"amount": "…",
"owner_id": "…",
"updated_at": "…"
}
}
]
}Airtable's REST API supports upserts directly: a PATCH to the records endpoint with performUpsert.fieldsToMergeOn matches incoming records to existing ones on up to three fields and updates or creates them. The response separates createdRecords from updatedRecords, which is the only way to tell an insert from an update. Fields you do not send are left alone with PATCH and cleared with PUT.
The limits shape the loader. Ten records per request and five requests per second per base means a 5,000-row entity takes 500 requests over at least 100 seconds, so send batches sequentially and back off on HTTP 429. The merge fields must identify one record; if two existing records match, the request fails rather than choosing. Land a focused field set, because bases also cap total records.
Up to three fields whose combination is unique in the table, typically the source record id stored in a single-line text field. Linked-record and formula fields cannot be merge fields.
Five requests per second per base, ten records each, so about 50 records per second at best. Exceeding it returns 429 and a short lockout; throttle client-side.
PATCH for syncs: it updates the listed fields and leaves others untouched. PUT rewrites the record and blanks any field you omit, including ones people edit by hand in the base.
A Datrise entrega entidades de CRM e SaaS no Airtable com exatamente esta mecânica, uma marca d'água sobre updated-at e colunas tipadas, então a instrução acima é a que roda por você. Entre na lista de espera para acesso antecipado.
Explorar o catálogo de integrações