# Create Record — Kintone

> Adds a new record to a Kintone App. See the documentation

- Key: `kintone-create-record`
- Type: Action (Write)
- Version: 0.0.1
- App: Kintone (`kintone`) — https://pipedream.com/apps/kintone.md
- This page (HTML): https://pipedream.com/apps/kintone/actions/create-record
- Hints: open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/kintone/actions/create-record/create-record.mjs

## Description

Adds a new record to a Kintone App. [See the documentation](https://kintone.dev/en/docs/kintone/rest-api/records/add-record/)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `appId` | `integer` | Yes | The Kintone App ID Options are loaded from the connected account. |
| `record` | `object` | Yes | Field codes and values are specified in this object. The values that can be specified vary depending on the type of field. If ignored, the record will be added with default field values. If field codes that don't exist are specified, these will be ignored. For more information on field types, refer to the following article: Field Types. Example: {"Text": {"value": "Sample"}, "Number": {"value": 1}} |

## 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": "kintone",
      },
    },
  },
)

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: "kintone-create-record",
  arguments: {
    appId: 10,
    record: "Record",
  },
})
```

**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: "kintone-create-record",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    kintone: { authProvisionId: "apn_xxxxxxx" },
    appId: 10,
    record: "Record",
  },
})

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": "kintone-create-record",
    "configured_props": {
      "kintone": { "authProvisionId": "apn_xxxxxxx" },
      "appId": 10,
      "record": "Record"
    }
  }'
```

---

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