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

# Create records

> Create Airtable records in provider-sized batches.

`createRecords` creates one or more records in the same table. Automate.ax
partitions the input into Airtable's 10-record API batches and returns every
created record in batch order.

## Example

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

export default automation("Import Airtable leads", () => {
  onHttpRequest({ scope: "automation" })
  createRecords({
    base: "CRM",
    table: "Leads",
    records: [
      { fields: { Name: "Ada", Status: "New" } },
      { fields: { Name: "Grace", 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.              |
| `records`               | `{ fields: Record<string, JsonValue> }[]`           | Yes      | —               | One or more records to create.        |
| `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 `AirtableRecord[]`; each item contains `id`, `createdTime`, and
`fields`.

<Note>
  Batches are separate provider requests. If a later batch fails, Airtable does
  not roll back records created by earlier batches.
</Note>
