# Create Dashboard — Metabase

> Create a new Dashboard. See the documentation.

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

## Description

Create a new Dashboard. [See the documentation](https://www.metabase.com/docs/latest/api#tag/apidashboard/post/api/dashboard/).

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `name` | `string` | Yes | The name of the dashboard |
| `description` | `string` | No | Description of the dashboard |
| `collectionId` | `string` | No | The ID of the collection Options are loaded from the connected account. |
| `collectionPosition` | `integer` | No | Position within the collection (must be greater than zero) |
| `cacheTtl` | `integer` | No | Cache time-to-live in seconds (must be greater than zero) |
| `parameters` | `string[]` | No | Array of parameter definition objects. Required properties: id (string) - Parameter identifier type (string) - Parameter type (e.g., "date/single", "text", "category") Optional properties: name (string) - Display name slug (string) - URL-friendly identifier sectionId (string) - Section grouping default - Default value values_source_type (enum) - "static-list", "card", or null values_source_config (object) - Dynamic value configuration with card_id, label_field, value_field, values temporal_units (array) - Time-based parameter units Example: {"id": "date_param", "type": "date/single", "name": "Date Filter", "slug": "date_filter", "default": "2024-01-01"} |

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

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: "metabase-create-dashboard",
  arguments: {
    name: "Name",
    description: "Description",
  },
})
```

**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: "metabase-create-dashboard",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    metabase: { authProvisionId: "apn_xxxxxxx" },
    name: "Name",
    description: "Description",
  },
})

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": "metabase-create-dashboard",
    "configured_props": {
      "metabase": { "authProvisionId": "apn_xxxxxxx" },
      "name": "Name",
      "description": "Description"
    }
  }'
```

---

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