> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rootly.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Alert Variables

> Reference for alert variables available in Liquid templates used by alert workflows, message templates, and other Liquid-rendered surfaces.

You can use alert variables in different parts of our application like:

* Alert workflow actions
* Slack and email message templates triggered by alerts
* Custom alert description templates

<Note>
  Alert routing rules use JSONPath and Alert Field conditions, not Liquid templates — see [Alert Routing](/alerts/alert-routing) for routing condition syntax.
</Note>

<Note>
  Use our [Liquid Markup explorer](https://rootly.com/account/help/liquid-explorer) to navigate through all alert variables against real alert data.
</Note>

We are using [Liquid](https://shopify.github.io/liquid/) template language and the variables below are available wherever an alert is in scope.

## Core

```ruby Ruby theme={null}
{{ alert.id }} # returns string (uuid)
{{ alert.short_id }} # returns string
{{ alert.summary }} # returns string
{{ alert.description }} # returns string
{{ alert.status }} # returns string — see Alert Statuses for the supported values
{{ alert.url }} # returns string — link to the alert in Rootly
{{ alert.created_at }} # returns datetime
```

## Source & External Links

```ruby Ruby theme={null}
{{ alert.source }} # returns string — name of the alert source (e.g., "datadog", "generic_webhook")
{{ alert.external_id }} # returns string — vendor-side identifier
{{ alert.external_url }} # returns string — link back to the originating monitor / alert
{{ alert.data }} # returns the raw inbound webhook payload as a JSON object
```

## Urgency

```ruby Ruby theme={null}
{{ alert.alert_urgency }} # returns object eg. {"id":"...", "name":"High", "description":"...", "team_id":...}
{{ alert.alert_urgency.id }} # returns string
{{ alert.alert_urgency.name }} # returns string
{{ alert.alert_urgency.description }} # returns string
```

## Responders & State Changes

```ruby Ruby theme={null}
{{ alert.responders }} # returns array of user objects (whoever was paged for the alert)
{{ alert.acknowledged_by }} # returns object eg. {"id":49, "name":"John Doe", "email":"john@acme.com"}
{{ alert.resolved_by }} # returns object eg. {"id":49, "name":"John Doe", "email":"john@acme.com"}
```

## Groups

Populated when alert grouping is configured.

```ruby Ruby theme={null}
{{ alert.groups }} # returns array of group objects the alert was grouped into
{{ alert.group_ids }} # returns array of string ids
{{ alert.group_slugs }} # returns array of slugs
{{ alert.raw_groups }} # returns array of full group objects with associations
```

## Linked Incidents

```ruby Ruby theme={null}
{{ alert.incidents }} # returns array of incident objects this alert is linked to
```

## Timeline

```ruby Ruby theme={null}
{{ alert.timeline }} # returns array of alert event objects (acknowledgements, escalations, resolution)
```

## Examples

Reaching into the raw webhook payload — the exact path depends on the source's payload shape, which you can inspect in the Liquid Explorer:

```ruby Ruby theme={null}
{{ alert.data | get: 'priority' }}
```

Building an urgency-aware Slack message:

```ruby Ruby theme={null}
*{{ alert.alert_urgency.name }}* — {{ alert.summary }}
Created at {{ alert.created_at | in_time_zone: 'America/New_York' | date: '%H:%M %Z' }}
{% if alert.acknowledged_by %}Acknowledged by {{ alert.acknowledged_by.name }}{% endif %}
```

Linking back to the originating monitor:

```ruby Ruby theme={null}
View in source: {{ alert.external_url }}
```
