# Get Alerts for an Incident

Retrieves the full set of alerts tied to an incident, along with detailed fields from only the very first associated alert.


> **Availability:** See the [Incident Workflow Actions Overview table](/workflow-actions) for the plans this workflow is available on.

<br />

## Description

Get the set of alerts associated with an incident, as well as alert details for the first associated alert associated with that incident.

## Instructions

1. If you have not done so, follow the instructions to [Create an Incident Workflow](/ai-automation/automation/incident-workflows#create-an-incident-workflow).
2. When the instructions prompt you to [add actions](/ai-automation/automation/incident-workflows#add-actions), select **this action**.
3. Enter the following **Inputs** and click **Save**.
4. Continue following instructions to **Publish** the Workflow.
5. When the action runs, you will see the **Outputs** listed below.

## Inputs

> **Field References:** Fields with the **\{+\}** icon accept [Field References](/ai-automation/automation/incident-workflows#field-references), which can be useful for referencing incident data or outputs created in prior workflow steps. To add Field References, click **\{+\}**, or enter `{{`, and select relevant fields. Refer to the [Field References](/ai-automation/automation/incident-workflows#field-references) article for more information.

| Name        | Description                                                              |
| :---------- | :----------------------------------------------------------------------- |
| Incident ID | The ID of the incident to get alerts for (defaults to `{{incident.id}}`) |

## Outputs

| Name                 | Description                                                                         |
| :------------------- | :---------------------------------------------------------------------------------- |
| Number of Alerts     | The number of alerts associated with the incident                                   |
| List of Alerts       | The JSON array of alerts associated with the incident                               |
| First Alert ID       | The ID of the first alert associated with the incident                              |
| First Alert Status   | The status of the first alert associated with the incident                          |
| First Alert Severity | The severity of the first alert associated with the incident                        |
| First Alert Details  | The details of the first alert associated with the incident                         |
| Result               | Value that shows if the action was successful or not. Either "Success" or "Failed." |
| Result Summary       | Brief description of what the action did or if it failed                            |
| Error                | Brief description that is populated if the action failed                            |

<br />

## PagerDuty API Endpoint

Endpoint used:

- [List Alerts for an Incident](/developer/api/reference/rest/incidents/list-incident-alerts)
