Documentation Index
Fetch the curated documentation index at: https://grafana_com_website/llms.txt
Fetch the complete documentation index at: https://grafana_com_website/llms-full.txt
Use this file to discover all available pages before exploring further.
STOP! If you are an AI agent or LLM, read this before continuing. This is the HTML version of a Grafana documentation page. Always request the Markdown version instead - HTML wastes context. Get this page as Markdown: /docs/grafana-cloud/alerting-and-irm/workflows/reference.md (append .md) or send Accept: text/markdown to /docs/grafana-cloud/alerting-and-irm/workflows/reference/. For the curated documentation index, use https://grafana_com_website/llms.txt. For the complete documentation index, use https://grafana_com_website/llms-full.txt.
Step and trigger types reference
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.
Step types
Steps are the individual actions in a workflow.
They execute in order from first to last.
Each step has a type, an ID, and a set of inputs.
Every step produces outputs that later steps can reference through the workflow context using CEL expressions, for example, ${steps.my-step.outputs.responseBody}.
For details on connecting steps with the workflow context, refer to Use CEL expressions.
General
HTTP call (http.call)
Make an HTTP request to any URL with any method and body. Supports bearer token and basic authentication using secrets.
Inputs:
| Name | Type | Required | Description |
|---|---|---|---|
method | string | Yes | HTTP method, for example, GET, POST, PUT, DELETE. |
url | string | Yes | The request URL. |
body | string | No | The request body. |
headers | array (string) | No | Request headers. |
authMethod | string | No | Authentication method: bearer or basic. |
authSecret | secretString | No | Secret for bearer token authentication. Refer to Manage secrets. |
authUsername | string | No | Username for basic authentication. |
authPassword | secretString | No | Password for basic authentication. Refer to Manage secrets. |
Outputs:
| Name | Type | Description |
|---|---|---|
responseCode | int | The HTTP response status code. |
responseBody | string | The response body. |
responseHeaders | array (string) | The response headers. |
No operation (noop)
Perform no action. Use this step as a placeholder during development or as a default branch target in switch steps.
This step has no inputs and produces no outputs.
Flow control
Transform (transform)
Evaluate a template string with embedded CEL expressions to generate dynamic content.
Use ${expression} syntax to embed expressions that reference workflow inputs and previous step outputs.
Inputs:
| Name | Type | Required | Description |
|---|---|---|---|
template | string | Yes | A template string with embedded ${expression} placeholders. |
Outputs:
| Name | Type | Description |
|---|---|---|
result | string | The rendered template string. |
Filter (filter)
Gate workflow execution on a CEL condition.
If the condition evaluates to false, the workflow stops and no further steps execute.
Inputs:
| Name | Type | Required | Description |
|---|---|---|---|
condition | string | Yes | A CEL expression that evaluates to a boolean. |
Outputs:
| Name | Type | Description |
|---|---|---|
matched | bool | true if the condition matched, false otherwise. |
Switch (switch)
Conditionally execute different sets of steps based on CEL expressions.
Each branch has a condition and its own list of steps.
The first branch whose condition evaluates to true runs.
Include a default branch with no condition as a fallback.
For details on how to define branches, refer to Create workflows.
Outputs:
| Name | Type | Description |
|---|---|---|
matchedCase | string | The condition expression of the matched branch. |
matchedBranchIndex | int | The zero-based index of the matched branch. |
error | string | An error message if evaluation failed. |
Wait (wait)
Pause workflow execution for a specified number of seconds.
Inputs:
| Name | Type | Required | Description |
|---|---|---|---|
seconds | int | Yes | The number of seconds to wait. |
Outputs:
| Name | Type | Description |
|---|---|---|
waitedSeconds | int | The number of seconds the step waited. |
Incident
Incident steps operate on Grafana Incidents. You can pass incident IDs directly or reference them from incident resources loaded into the workflow context. For details on loading incident data, refer to Load incident data.
Add participant to incident (incident.add-participant)
Add a user to a Grafana Incident with a specific role.
Inputs:
| Name | Type | Required | Description |
|---|---|---|---|
incidentID | string | Yes | The incident ID. |
userID | string | Yes | The user ID or email address of the participant. |
role | string | No | The participant role: commander, investigator, or observer. Defaults to observer. |
Outputs:
| Name | Type | Description |
|---|---|---|
success | bool | true if the participant was added successfully. |
didChange | bool | true if the participant was newly added. |
incidentID | string | The incident ID. |
error | string | An error message if the operation failed. |
Set incident field (incident.set-field)
Update a field on a Grafana Incident, including title, status, severity, or role assignments.
Inputs:
| Name | Type | Required | Description |
|---|---|---|---|
incidentID | string | Yes | The incident ID. |
field | string | Yes | The field to update, for example, title, status, severity, role. |
value | string | Yes | The new value for the field. |
userID | string | No | Required when field is role. The user ID to assign the role to. |
Outputs:
| Name | Type | Description |
|---|---|---|
success | bool | true if the field was updated successfully. |
incidentID | string | The incident ID. |
error | string | An error message if the operation failed. |
Slack
Create Slack channel (slack.channel.create)
Create a new public or private Slack channel.
Inputs:
| Name | Type | Required | Description |
|---|---|---|---|
channelName | string | Yes | The name for the new channel. |
isPrivate | bool | No | Set to true to create a private channel. |
Outputs:
| Name | Type | Description |
|---|---|---|
channelID | string | The Slack channel ID. |
channelName | string | The final channel name assigned by Slack. |
Post message to Slack channel (slack.message.post)
Post a message to a Slack channel. Supports plain text, Block Kit blocks for rich formatting, attachments, and threaded replies.
Inputs:
| Name | Type | Required | Description |
|---|---|---|---|
channelID | string | Yes | The Slack channel ID to post to. |
messageText | string | No | Plain text message content. |
blocks | string | No | A JSON string of Slack Block Kit blocks for rich formatting. |
threadTs | string | No | The timestamp of a parent message to reply in a thread. |
replyBroadcast | bool | No | Set to true to also post the reply to the channel. |
attachments | string | No | A JSON array string of Slack message attachments. |
Outputs:
| Name | Type | Description |
|---|---|---|
messageID | string | The posted message ID. |
Archive Slack channel (slack.channel.archive)
Archive a Slack channel.
Inputs:
| Name | Type | Required | Description |
|---|---|---|---|
channelID | string | Yes | The Slack channel ID to archive. |
Outputs:
| Name | Type | Description |
|---|---|---|
success | bool | true if the channel was archived successfully. |
Add bookmark to Slack channel (slack.channel.add-bookmark)
Add a bookmark link to a Slack channel.
Inputs:
| Name | Type | Required | Description |
|---|---|---|---|
channelID | string | Yes | The Slack channel ID. |
bookmarkTitle | string | Yes | The title for the bookmark. |
bookmarkUrl | string | Yes | The URL for the bookmark. |
bookmarkEmoji | string | No | An emoji to display with the bookmark. |
Outputs:
| Name | Type | Description |
|---|---|---|
bookmarkID | string | The ID of the created bookmark. |
Add users to Slack channel (slack.channel.add-users)
Invite users to a Slack channel by their Slack user IDs.
Inputs:
| Name | Type | Required | Description |
|---|---|---|---|
channelID | string | Yes | The Slack channel ID. |
users | array (string) | Yes | A list of Slack user IDs to invite. |
Outputs:
| Name | Type | Description |
|---|---|---|
success | bool | true if the users were added successfully. |
IRM
Page user via IRM (irm.page-user)
Create an IRM/OnCall escalation to page a user. Optionally associates the escalation with an incident and includes urgency and message context.
Inputs:
| Name | Type | Required | Description |
|---|---|---|---|
userIdentifier | string | Yes | The user identifier value, interpreted according to identifierType. |
identifierType | string | No | Identifier mode: id (default), username, or email. For email, the step resolves the user via the OnCall API. |
incidentID | string | No | An incident ID to associate with the escalation. |
important | bool | No | Set to true to mark the escalation as important. Defaults to false. |
message | string | No | A message to attach to the escalation. |
Outputs:
| Name | Type | Description |
|---|---|---|
oncallUserID | string | The resolved user identifier used in the escalation. |
escalationID | string | The created escalation ID. |
state | string | The escalation state returned by OnCall, for example, triggered. |
alertGroupURL | string | A permalink to the related IRM alert group, if returned. Otherwise empty. |
error | string | An error message if the operation failed. Empty on success. |
Trigger types
Triggers define when a workflow starts. You configure triggers in the startWhen section of a workflow definition.
For details on configuring triggers, refer to Configure triggers.
Event trigger
An event trigger starts a workflow when an incoming event matches a regular expression pattern.
Events arrive on NATS subjects following the format {app}.{instance-id}.{resource-type}.{event-type}.
You define event triggers using matching rules. Each rule contains a regex pattern that the engine tests against incoming event subjects. If any rule matches, the workflow starts.
Configuration:
| Field | Type | Required | Description |
|---|---|---|---|
eventNameRegex | string | Yes | A regular expression tested against the event subject. The workflow starts if the pattern matches. |
Example:
startWhen:
matchingRules:
- eventNameRegex: "grafana_irm_app\\.incident\\.created"
- eventNameRegex: "grafana_irm_app\\.alert_groups\\.fired"A workflow can have multiple matching rules. The workflow triggers if any rule matches.
Available event sources
The following table lists the event sources that can trigger workflows:
| App | Resource | Event types | Example event name |
|---|---|---|---|
grafana_irm_app | incident | created, updated, and other state changes | grafana_irm_app.incident.created |
grafana_irm_app | alert_groups | fired and other alert group events | grafana_irm_app.alert_groups.fired |
Event names follow the pattern {app}.{resource-type}.{event-type}.
Schedule trigger
A schedule trigger starts a workflow at recurring times using a cron expression. Schedules use the standard five-field Unix cron format and run in UTC.
Configuration:
| Field | Type | Required | Description |
|---|---|---|---|
| (schedule) | string | Yes | A five-field Unix cron expression in UTC, for example, 0 9 * * 1-5. |
Example:
startWhen:
schedules:
- "0 9 * * 1-5"
- "0 0 1 * *"A workflow can have multiple schedules. Each schedule triggers the workflow independently.
Cron field reference:
| Field | Range | Special characters |
|---|---|---|
| Minute | 0-59 | *, ,, -, / |
| Hour | 0-23 | *, ,, -, / |
| Day of month | 1-31 | *, ,, -, / |
| Month | 1-12 | *, ,, -, / |
| Day of week | 0-7 (0 and 7 are Sunday) | *, ,, -, / |
Manual trigger
A manual trigger starts a workflow only through the UI or API. Any workflow can be triggered manually regardless of whether it has event or schedule triggers configured.
To trigger a workflow manually in the editor, click Test and provide sample input data as a JSON object.
Manual-only workflows have an empty startWhen section:
startWhen:
matchingRules: []
schedules: []Combine triggers
A workflow can have both event and schedule triggers. The workflow starts when any matching rule matches an incoming event or when any schedule fires.
startWhen:
matchingRules:
- eventNameRegex: "grafana_irm_app\\.incident\\.created"
schedules:
- "0 9 * * 1-5"Was this page helpful?
Related resources from Grafana Labs


