> ## Documentation Index
> Fetch the complete documentation index at: https://docs.automate.ax/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# Update record

> Merge into or replace one Airtable record's writable fields.

`updateRecord` changes one record. Merge mode touches only supplied fields;
replace mode replaces its writable field set and can clear omitted values.

## Example

```ts automations/update-airtable-record.automation.ts theme={null}
import { automation, onHttpRequest } from "automate.ax"
import { updateRecord } from "automate.ax/airtable"

export default automation("Qualify an Airtable lead", () => {
  onHttpRequest({ scope: "automation" })
  updateRecord({
    base: "CRM",
    table: "Leads",
    recordId: "rec123",
    fields: { Status: "Qualified" },
  })
})
```

## Inputs

| Input                   | Type                                                | Required | Default         | Description                                  |
| ----------------------- | --------------------------------------------------- | -------- | --------------- | -------------------------------------------- |
| `base`                  | `string`                                            | Yes      | —               | Exact base name or stable ID.                |
| `table`                 | `string`                                            | Yes      | —               | Table name or stable ID.                     |
| `recordId`              | `string`                                            | Yes      | —               | Stable ID of the record to update.           |
| `fields`                | `Record<string, JsonValue>`                         | Yes      | —               | New values keyed by field name or ID.        |
| `mode`                  | `"merge" \| "replace"`                              | No       | `"merge"`       | Preserve or replace omitted writable fields. |
| `typecast`              | `boolean`                                           | No       | `false`         | Ask Airtable to coerce string values.        |
| `returnFieldsByFieldId` | `boolean`                                           | No       | `false`         | Key returned fields by stable IDs.           |
| `account`               | `string \| IntegrationAccountReference<"airtable">` | No       | Project default | Connected Airtable account.                  |

## Output

Returns the updated `AirtableRecord` with `id`, `createdTime`, and `fields`.

<Warning>
  `mode: "replace"` can clear writable fields you omit. Use merge mode unless
  replacing the record's field set is intentional.
</Warning>
