Reference · Tools

Grafana

Manage dashboards, teams, team members, and users in a Grafana instance

Action Analytics v1

The Grafana node connects to your Grafana instance via its HTTP API to manage dashboards, teams, team members, and organization users. You can build workflows that automatically provision dashboards when a new service is deployed, or sync team membership from an external source. Authentication uses a Grafana API key with bearer token auth.

Node type
Action
Parameters
38
Outputs
Output, Error
Credentials
Grafana API

Grafana

Manage dashboards, teams, team members, and users in Grafana.

Overview

Grafana is an open-source monitoring and observability platform. This tool interacts with the Grafana HTTP API to manage dashboards (create, get, update, delete), teams (create, get, update, delete), team members (add, list, remove), and organization users (create, delete, list, update roles). It uses bearer token authentication with a Grafana API key.

Category: Analytics
Tool Name: grafana
Version: 1

Appearance: Icon: si-grafana | Color: #F46800

Node Type

Action — processes input items and produces output

Input / Output

DirectionPort(s)
InputInput
OutputOutput, Error

Credentials

This tool requires Grafana API credentials. See the Credentials Guide for setup instructions.

Resources

ResourceValue
Dashboarddashboard
Teamteam
Team MemberteamMember
Useruser

Operations

Each resource has its own Operation list, and several resources reuse the same operation values (create, delete, get, getAll, update). Pick the resource first, then the operation.

ResourceOperationValueDescription
DashboardCreatecreateCreate a dashboard
DashboardDeletedeleteDelete a dashboard
DashboardGetgetGet a dashboard
DashboardGet ManygetAllGet many dashboards
DashboardUpdateupdateUpdate a dashboard
TeamCreatecreateCreate a team
TeamDeletedeleteDelete a team
TeamGetgetGet a team
TeamGet ManygetAllGet many teams
TeamUpdateupdateUpdate a team
Team MemberAddaddAdd a member to a team
Team MemberGet ManygetAllGet many team members
Team MemberRemoveremoveRemove a member from a team
UserCreatecreateAdd a user to the current organization
UserDeletedeleteDelete a user from the current organization
UserGet ManygetAllGet many users in the current organization
UserUpdateupdateUpdate a user in the current organization

Parameters

Every parameter accepts expressions, so IDs and names can be driven from the incoming item. User operations act on the organization the API key belongs to.

Dashboard: Create

ParameterTypeRequiredDefaultDescription
TitlestringYesTitle of the dashboard to create.
Additional Fields (additionalFields)collectionNo{}Optional properties for the new dashboard.
— Folder ID (folderId)stringNoID of the folder to create the dashboard in. If unspecified, the dashboard is saved to the General folder. Find folder IDs by calling GET /api/folders on your Grafana instance.

Dashboard: Delete

ParameterTypeRequiredDefaultDescription
Dashboard UID or URL (dashboardUidOrUrl)stringYesUnique alphabetic identifier or full Grafana URL of the dashboard.

Dashboard: Get

ParameterTypeRequiredDefaultDescription
Dashboard UID or URL (dashboardUidOrUrl)stringYesUnique alphabetic identifier or full Grafana URL of the dashboard to retrieve.

Dashboard: Get Many

ParameterTypeRequiredDefaultDescription
Return AllbooleanNofalseWhether to return all results or only up to a given limit.
LimitnumberNo50Max number of results to return (1–100). (shown when Return All is false)
FilterscollectionNo{}Narrow the listing.
— Search Query (query)stringNoSearch query to filter dashboards by name.

Dashboard: Update

ParameterTypeRequiredDefaultDescription
Dashboard UID or URL (dashboardUidOrUrl)stringYesUnique alphabetic identifier or full Grafana URL of the dashboard to update.
Update FieldscollectionNo{}Fields to change. Add at least one — the item fails if this is empty.
— Folder ID (folderId)stringNoID of the folder to move the dashboard into. If unspecified, the dashboard stays in its current folder.
— Title (title)stringNoNew title for the dashboard.

Team: Create

ParameterTypeRequiredDefaultDescription
NamestringYesName of the team to create.
Additional Fields (additionalFields)collectionNo{}Optional properties for the new team.
— Email (email)stringNoEmail address for the team.

Team: Delete

ParameterTypeRequiredDefaultDescription
Team IDstringYesID of the team to delete.

Team: Get

ParameterTypeRequiredDefaultDescription
Team IDstringYesID of the team to retrieve.

Team: Get Many

ParameterTypeRequiredDefaultDescription
Return AllbooleanNofalseWhether to return all results or only up to a given limit.
LimitnumberNo50Max number of results to return. (shown when Return All is false)
FilterscollectionNo{}Narrow the listing.
— Name (name)stringNoFilter teams by name.

Team: Update

ParameterTypeRequiredDefaultDescription
Team IDstringYesID of the team to update.
Update FieldscollectionNo{}Fields to change. Only the fields you add are sent.
— Email (email)stringNoNew email address for the team.
— Name (name)stringNoNew name for the team.

Team Member: Add

ParameterTypeRequiredDefaultDescription
User ID (userId)stringYesID of the user to add to the team. Find user IDs via the user getAll operation or GET /api/org/users.
Team IDstringYesID of the team to add the user to. Find team IDs via the team getAll operation or GET /api/teams/search.

Team Member: Get Many

ParameterTypeRequiredDefaultDescription
Team IDstringYesID of the team to retrieve members from.
Return AllbooleanNofalseWhether to return all results or only up to a given limit.
LimitnumberNo50Max number of results to return. (shown when Return All is false)

Team Member: Remove

ParameterTypeRequiredDefaultDescription
User ID (memberId)stringYesID of the user to remove from the team. Note the internal name differs from the Add operation’s User ID.
Team IDstringYesID of the team to remove the user from.

User: Create

ParameterTypeRequiredDefaultDescription
RoleoptionsYesViewerRole to assign to the user in the organization.
Options: Admin, Editor, Viewer
Login or Email (loginOrEmail)stringYesLogin name or email address of the user to add to the organization.

User: Delete

ParameterTypeRequiredDefaultDescription
User ID (userId)stringYesID of the user to delete from the organization.

User: Get Many

ParameterTypeRequiredDefaultDescription
Return AllbooleanNofalseWhether to return all results or only up to a given limit.
LimitnumberNo50Max number of results to return. (shown when Return All is false)

User: Update

ParameterTypeRequiredDefaultDescription
User ID (userId)stringYesID of the user to update.
Update FieldscollectionNo{}Fields to change. Add at least one — the item fails if this is empty.
— Role (role)optionsNoAdminNew role for the user in the organization.
Options: Admin, Editor, Viewer

All Operations

ParameterTypeRequiredDefaultDescription
Max ConcurrencynumberNo10Maximum number of items to process concurrently (1–100).

Output Data

The Grafana response is merged onto the input item’s JSON at the top level — the fields the item already carried survive, and a response key with the same name overwrites the item’s value. Binary data on the input item is forwarded unchanged.

The number of output items follows the shape of the reply: an array reply fans out to one output item per entry, and any other reply produces exactly one output item.

OperationOutput
Dashboard Get Many, Team Get Many, Team Member Get Many, User Get ManyOne output item per dashboard, team, member or user. A listing that matches nothing produces no output items at all, so that branch of the workflow simply stops.
Dashboard Create, Dashboard UpdateOne output item carrying Grafana’s save response for the dashboard.
Dashboard Get, Team GetOne output item carrying the record.
Dashboard Delete, Team Create, Team Delete, Team Update, Team Member Add, Team Member Remove, User Create, User Delete, User UpdateOne output item carrying Grafana’s confirmation for that call.

Usage Examples

  • Create a new Grafana dashboard
  • List all dashboards in Grafana
  • Add a user to a Grafana team
  • Update a user role in the organization

Example Configuration

Create a dashboard in a folder:

{
  "type": "grafana",
  "parameters": {
    "resource": "dashboard",
    "operation": "create",
    "title": "{{ $json.serviceName }} overview",
    "additionalFields": {
      "folderId": "12"
    }
  }
}

Search dashboards by name, one item each:

{
  "type": "grafana",
  "parameters": {
    "resource": "dashboard",
    "operation": "getAll",
    "returnAll": false,
    "limit": 50,
    "filters": {
      "query": "monitoring"
    }
  }
}

Rename a dashboard and move it to another folder:

{
  "type": "grafana",
  "parameters": {
    "resource": "dashboard",
    "operation": "update",
    "dashboardUidOrUrl": "abc123def",
    "updateFields": {
      "title": "Updated Dashboard Title",
      "folderId": "14"
    }
  }
}

Delete a dashboard by the URL someone pasted into the item:

{
  "type": "grafana",
  "parameters": {
    "resource": "dashboard",
    "operation": "delete",
    "dashboardUidOrUrl": "{{ $json.dashboardUrl }}"
  }
}

Create a team with a contact address:

{
  "type": "grafana",
  "parameters": {
    "resource": "team",
    "operation": "create",
    "name": "Development Team",
    "additionalFields": {
      "email": "dev-team@company.com"
    }
  }
}

Add a user to a team:

{
  "type": "grafana",
  "parameters": {
    "resource": "teamMember",
    "operation": "add",
    "userId": "15",
    "teamId": "5"
  }
}

Remove a user from a team — note the field is memberId here:

{
  "type": "grafana",
  "parameters": {
    "resource": "teamMember",
    "operation": "remove",
    "memberId": "15",
    "teamId": "5"
  }
}

Invite an existing Grafana user into the organization as an editor:

{
  "type": "grafana",
  "parameters": {
    "resource": "user",
    "operation": "create",
    "role": "Editor",
    "loginOrEmail": "{{ $json.email }}"
  }
}

Promote a user to admin:

{
  "type": "grafana",
  "parameters": {
    "resource": "user",
    "operation": "update",
    "userId": "{{ $json.userId }}",
    "updateFields": {
      "role": "Admin"
    }
  }
}

Error Handling

ModeBehavior
stopHalts workflow on first error
continueSkips failed items, passes successful ones through
errorPortRoutes failed items to Error output port

Tips

Manage dashboards, teams, team members, and users in a Grafana instance.

  • Dashboards are addressed by UID. The field accepts the bare UID or the full dashboard URL and pulls the UID out of it, so you can paste a link straight from a browser.
  • Update needs at least one field. Dashboard Update and User Update fail the item when their fields collection is empty, rather than making a no-op call.
  • Two different User ID fields. Team Member: Add uses userId; Team Member: Remove uses memberId. They look identical in the panel but are different keys in a JSON config.
  • Dashboard Update overwrites. The node re-saves the dashboard with the fields you supplied, so it checks the dashboard exists first and fails the item if it does not.
  • A connection error reads as a credential problem. If the instance is unreachable the node reports “Invalid credentials or error in establishing connection with given credentials” — check the base URL as well as the key.

Frequently asked questions

How do I reference a specific dashboard — do I need to find its UID somewhere?

You can paste either the bare UID or the full dashboard URL directly into the dashboard field — the node extracts the UID from the URL automatically. This means you can copy a link straight from your browser without manually hunting down the UID.

What happens if I run a Dashboard Update or User Update without specifying any fields to change?

Both operations require at least one field to be set. If the fields collection is empty, the node fails that item rather than sending a no-op request to Grafana. Make sure your workflow always populates at least one field before calling an update operation.

I'm getting an 'Invalid credentials or error in establishing connection' error, but my API key looks correct. What else should I check?

That error also appears when the Grafana instance itself is unreachable, not just when the key is wrong. Before rotating your API key, verify that the base URL in your Grafana API credentials points to the correct host and port. A typo in the URL and a bad key produce identical error messages.

I'm trying to remove a team member but the field name I used when adding them doesn't work. Why?

Team Member: Add and Team Member: Remove use different field names for what looks like the same thing. Add uses userId while Remove uses memberId. They appear visually similar in the node panel but are distinct keys in the underlying configuration — make sure you're setting the right one for the operation you're performing.

Does Dashboard Update merge my changes with the existing dashboard, or does it overwrite it?

It overwrites. The node fetches the existing dashboard first — and fails the item if it doesn't exist — then re-saves it with the fields you supplied. This means fields you don't explicitly include in the update may be reset, so provide all required dashboard fields, not just the ones you want to change.

Build with the Grafana node

Drop it into a workflow, wire it to an agent, or call it on a schedule. You'll need Grafana API credentials first.

Open BusyBot

Last updated . Spotted something wrong? Tell us.