Skip to main content

Configure Runbook Actions

This guide explains how to use incident and alert fields in your runbook actions to create dynamic, context-aware automation.

Overview

Runbook actions can reference incident and alert data using two expression systems:

  • Mustache template syntax: {{incident.field_name}} or {{alert.field_name}} for simple variable substitution
  • CEL expression syntax: ${{expression}} for logic, conditions, and transformations

This allows you to:

  • Pass contextual information from incidents to runbook actions
  • Create dynamic messages with incident details
  • Route actions based on severity, service, or custom fields
  • Apply logic and transformations with CEL expressions
  • Build reusable runbooks that adapt to different scenarios

All field references are configured through form-based UI inputs with a data picker that shows available fields based on your selected incident or alert context.


Choosing between Mustache and CEL

FeatureMustache ({{variable}})CEL (${{expression}})
PurposeSimple variable substitutionLogic and computation
Use whenDisplaying field valuesConditional logic, calculations, transformations
Example{{incident.severity}}${{incident.severity == "0" ? "CRITICAL" : "Normal"}}
OutputString onlyAny type (string, number, boolean, etc.)
MixingCannot mix with CEL in same fieldCannot mix with Mustache in same field

Decision criteria:

  • Use Mustache for simple variable display and basic text substitution
  • Use CEL when you need conditional logic, regex matching, calculations, or string transformations
Important

You cannot mix CEL and Mustache syntax in the same field. Each field uses either ${{cel}} or {{mustache}}, not both. Different fields in the same runbook can use different expression modes.

Go to CEL Expressions in AI SRE for complete CEL syntax reference and advanced examples.

Go to Use System Fields in Runbook Actions for a complete reference of available incident, alert, and activity fields.


Next steps

Learn how to use incident and alert data in your runbook actions for dynamic automation.

info

Need Help? Contact our support team by email at support@harness.io or visit the Harness Documentation for additional resources and troubleshooting guides.