View as Markdown
Grafana icon

Grafana ACTION

Save Dashboard

Create or update a Grafana dashboard. This is an upsert operation — if the dashboard UID exists, it updates; otherwise it creates. Use Get Dashboard to retrieve an existing dashboard model before modifying it. Use List Folders to find the target folder UID. Pass overwrite: true to force-save over version conflicts. See the documentation
  • Action
  • Writes data
  • API key
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Grafana account once, then configure and run Save Dashboard from your backend or agent.

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: "grafana-save-dashboard",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    grafana: { authProvisionId: "apn_xxxxxxx" },
    dashboard: "Dashboard Model",
    folderUid: "Folder UID",
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

Save Dashboard inputs
Property Type Description
dashboard Dashboard Model string
JSON dashboard model. Use Get Dashboard to retrieve an existing model, modify it, and pass it back. For a new dashboard, provide at minimum: {"title": "My Dashboard", "panels": []}. Set "uid": null or omit it to auto-generate a new UID.
Required
folderUid Folder UID string
Folder UID to save the dashboard into. Use List Folders to discover available folders.
Optional
message Commit Message string
Version commit message for the dashboard change.
Optional
overwrite Overwrite boolean
Overwrite existing dashboard if UID matches, even with version conflicts. Default: false.
Optional

REFERENCE

Tool details

Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.

Registry key
grafana-save-dashboard
Version
0.0.3
App
Grafana
Authentication
API key
Read-only
No
Destructive
No
Open world
Yes