# Create Comment — Airtable

> Create a comment on a selected record. See the documentation

- Key: `airtable_oauth-create-comment`
- 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-comment
- Hints: open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/airtable_oauth/actions/create-comment/create-comment.mjs

## Description

Create a comment on a selected record. [See the documentation](https://airtable.com/developers/web/api/create-comment)

## 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. |
| `recordId` | `string` | Yes | The ID of the record to operate on. IDs always start with rec, e.g. recAbC123XyZ456. Use List Records to look one up. |
| `comment` | `string` | Yes | The text comment to create |

## 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-comment",
  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-comment",
  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-comment",
    "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
