# Create Export — Gigasheet

> Creates an export for a gigasheet dataset. See the documentation

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

## Description

Creates an export for a gigasheet dataset. [See the documentation](https://gigasheet.readme.io/reference/post_dataset-handle-export)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `handle` | `string` | Yes | The handle of the dataset you want to export Options are loaded from the connected account. |
| `filename` | `string` | No | File name |
| `folderHandle` | `string` | No | Folder handle of the uploaded file |
| `gridState` | `object` | Yes | Grid state object. Values will be attempted to be parsed as JSON strings. See the documentation for valid properties. |
| `recordsPerFile` | `integer` | No | Records per File |

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

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: "gigasheet-create-export",
  arguments: {
    handle: "Handle",
    filename: "File name",
  },
})
```

**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: "gigasheet-create-export",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    gigasheet: { authProvisionId: "apn_xxxxxxx" },
    handle: "Handle",
    filename: "File name",
  },
})

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": "gigasheet-create-export",
    "configured_props": {
      "gigasheet": { "authProvisionId": "apn_xxxxxxx" },
      "handle": "Handle",
      "filename": "File name"
    }
  }'
```

---

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