> ## 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 records

> Merge into or replace Airtable records in provider-sized batches.

`updateRecords` applies updates to one or more records in the same table. It
sends at most 10 records per Airtable request and returns their new values.

## Example

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

export default automation("Close Airtable tasks", () => {
  onHttpRequest({ scope: "automation" })
  updateRecords({
    base: "Operations",
    table: "Tasks",
    records: [
      { id: "recOne", fields: { Status: "Done" } },
      { id: "recTwo", fields: { Status: "Done" } },
    ],
  })
})
```

## Inputs

| Input                   | Type                                                  | Required | Default         | Description                           |
| ----------------------- | ----------------------------------------------------- | -------- | --------------- | ------------------------------------- |
| `base`                  | `string`                                              | Yes      | —               | Exact base name or stable ID.         |
| `table`                 | `string`                                              | Yes      | —               | Table name or stable ID.              |
| `records`               | `{ id: string; fields: Record<string, JsonValue> }[]` | Yes      | —               | One or more record updates.           |
| `mode`                  | `"merge" \| "replace"`                                | No       | `"merge"`       | Strategy applied to every record.     |
| `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[]` in provider batch order.

<Warning>
  Replace mode can clear omitted writable fields. Batches are not transactional:
  a later failure does not roll back earlier updates.
</Warning>
