Documentation for automated readers
A curated documentation index is available at: https://grafana.com/llms.txt
A complete documentation index is available at: https://grafana.com/llms-full.txt
These indexes can help with page discovery before fetching individual documents.
This page is also available in Markdown, which may be easier for automated readers and AI tools to parse than HTML. The Markdown version is available at https://grafana.com/docs/grafana-cloud/alerting-and-irm/workflows/get-started.md, or by sending Accept: text/markdown to https://grafana.com/docs/grafana-cloud/alerting-and-irm/workflows/get-started/. For broader documentation discovery, the curated index is available at https://grafana.com/llms.txt and the complete index is available at https://grafana.com/llms-full.txt.
Get started with Grafana Workflows
Note
Grafana Workflows is currently in private preview. Grafana Labs offers support on a best-effort basis, and breaking changes might occur prior to the feature being made generally available.
This guide walks you through creating your first workflow in Grafana Workflows. You’ll build an incident response automation that reacts to updates on critical incidents, creates a Slack channel, assigns a commander, and posts a summary.
Before you begin
To complete this guide, you need:
- A Grafana Cloud account with Workflows enabled for your stack
- Access to a Slack workspace connected to your Grafana Cloud instance
Create a workflow
- In Grafana, navigate to More apps and open the Workflows app.
- Click New workflow.
- Enter a name for your workflow, for example, “Critical Incident Response”.
Choose a trigger
The first step is to choose when your workflow runs. For this example, you’ll trigger the workflow when an incident is updated. The filter step you add next narrows that down to critical incidents only.
- Select Event as the trigger type, then choose Incident updated.
Add a filter step
To respond only to critical incidents, add a filter step.
Click + on the last node in the workflow tree.
Search for “filter” in the action palette and select it.
In the condition field, enter:
textinputs.data.severity == 'critical'The workflow stops if the condition evaluates to
false.
Add a Slack channel step
- Click + to add another step.
- Search for “Create Slack channel” and select it.
- Set the channel name to
inc-${inputs.data.incidentID}.
Add a commander assignment step
- Click + to add another step.
- Search for “Add participant to incident” and select it.
- Set the incident ID to
${inputs.data.incidentID}. - Set the user ID to the email or user ID of your on-call commander.
- Set the role to
commander.
Add a notification step
Click + to add another step.
Search for “Post message to Slack channel” and select it.
Set the channel ID to
${steps.create-channel.outputs.channelID}to post to the channel you just created.Set the message text to:
textIncident ${inputs.data.incidentID}: ${inputs.data.title} Severity: ${inputs.data.severity} Commander assigned.
Test the workflow
Click Run in the editor header.
In the Trigger Workflow dialog, replace the placeholder event with the following JSON, then click Trigger Workflow.
JSON{ "id": "example-message-id", "type": "grafana_irm_app.incident.updated", "source": "grafana_irm_app/100", "time": "2026-05-21T15:00:00Z", "data": { "incidentID": "123", "title": "Database connection pool exhausted", "severity": "critical" } }Workflows expects an event in CloudEvents shape. The fields under
databecome available in your steps asinputs.data.*. The other fields (id,type,source,time) describe the event itself.To see the results, click the arrow next to Run to open the Latest runs panel. Select the run to inspect each step’s inputs and outputs.
Enable the workflow
After testing, click Save to persist your workflow, then toggle the Enable switch in the header so it runs automatically when matching events arrive.
View the workflow definition
Open the More menu in the editor header and select View JSON to view the complete workflow definition. The following YAML shows the equivalent definition for the workflow you built:
apiVersion: workflows.ext.grafana.com/v1alpha1
kind: Definition
metadata:
name: critical-incident-response
spec:
name: "Critical Incident Response"
enabled: true
startWhen:
matchingRules:
- eventNameRegex: "grafana_irm_app\\.incident\\.updated"
steps:
- id: check-severity
type: filter
inputs:
condition: "inputs.data.severity == 'critical'"
- id: create-channel
type: slack.channel.create
inputs:
channelName: "inc-${inputs.data.incidentID}"
- id: assign-commander
type: incident.add-participant
inputs:
incidentID: "${inputs.data.incidentID}"
userID: "oncall@example.com"
role: "commander"
- id: post-summary
type: slack.message.post
inputs:
channelID: "${steps.create-channel.outputs.channelID}"
messageText: "Incident ${inputs.data.incidentID}: ${inputs.data.title}\nSeverity: ${inputs.data.severity}\nCommander assigned."Next steps
Was this page helpful?
Related resources from Grafana Labs


