# Create Multiple Records — Airtable

> Create one or more records in a table in a single operation with an array. See the documentation

- Key: `airtable_oauth-create-multiple-records`
- Type: Action (Write)
- Version: 0.0.15
- App: Airtable (`airtable_oauth`) — https://pipedream.com/apps/airtable-oauth.md
- This page (HTML): https://pipedream.com/apps/airtable-oauth/actions/create-multiple-records
- Hints: open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/airtable_oauth/actions/create-multiple-records/create-multiple-records.mjs

## Description

Create one or more records in a table in a single operation with an array. [See the documentation](https://airtable.com/developers/web/api/create-records)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `baseId` | `string` | Yes | The ID of the base to use, e.g. appXXXXXXXXXXXXXX. Use List Bases to look one up. |
| `tableId` | `string` | Yes | The ID of the table to use, e.g. tblXXXXXXXXXXXXXX. Use List Tables to look one up. |
| `records` | `string[]` | Yes | Each item in the array should be an object in JSON format, representing a new record. The keys are the column names and the corresponding values are the data to insert. |
| `typecast` | `boolean` | No | The Airtable API will perform best-effort automatic data conversion from string values if the typecast parameter is True. This is disabled by default to ensure data integrity, but it may be helpful for integrating with 3rd party data sources. |
| `returnFieldsByFieldId` | `boolean` | No | If set to true, the returned field objects will have the field ID as the key, instead of the field name. |

## Run it

**MCP**

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "airtable_oauth",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
  name: "airtable_oauth-create-multiple-records",
  arguments: {
    baseId: "Base",
    tableId: "Table",
  },
})
```

**TypeScript**

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "airtable_oauth-create-multiple-records",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    airtable_oauth: { authProvisionId: "apn_xxxxxxx" },
    baseId: "Base",
    tableId: "Table",
  },
})

console.log(result)
```

**cURL**

```bash
curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
  -H "Content-Type: application/json" \
  -H "X-PD-Environment: production" \
  -H "Authorization: Bearer {access_token}" \
  -d '{
    "external_user_id": "{external_user_id}",
    "id": "airtable_oauth-create-multiple-records",
    "configured_props": {
      "airtable_oauth": { "authProvisionId": "apn_xxxxxxx" },
      "baseId": "Base",
      "tableId": "Table"
    }
  }'
```

---

- App: https://pipedream.com/apps/airtable-oauth.md · All apps: https://pipedream.com/apps
