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

# PagerDuty integration

> Connect PagerDuty to Devin to trigger automations from incidents and give Devin sessions access to incidents, services, and on-call schedules.

Connect PagerDuty so Devin can start working as soon as an incident fires. PagerDuty incidents trigger Devin [automations](/product-guides/automations), and the PagerDuty MCP server gives Devin sessions access to incidents, services, and on-call schedules.

## Setting up the integration

1. In PagerDuty, go to **Integrations > API Access Keys** and click "Create New API Key". Create a **General Access** key with full access, and copy it. User API tokens are not accepted.
2. In your Devin account at app.devin.ai, go to [Settings > Connections > PagerDuty](https://app.devin.ai/settings/connections/pagerduty), and click "Connect".
3. Select your **API region** (US or EU), then enter:
   * **Actor email**: the PagerDuty user that Devin's incident notes and updates are attributed to. We recommend a dedicated service user.
   * **General Access REST API key**: the key you created in step 1.
4. Click "Connect". Devin automatically creates a webhook subscription in PagerDuty so it can receive incident events.

## Configure webhook subscriptions

When you connect, Devin creates one account-wide webhook subscription in PagerDuty. It sends these events to Devin:

* `incident.triggered`
* `incident.acknowledged`
* `incident.resolved`
* `incident.priority_updated`
* `incident.reassigned`
* `incident.service_updated`

The **Webhook** section of the settings page shows the subscription's status. If automatic setup fails, click "Retry webhook setup", or add the webhook manually:

1. In the **Webhook** section, click "Add webhook" and copy the webhook URL.
2. In PagerDuty, go to **Integrations > Generic Webhooks (v3)**, and add a webhook that points at that URL with **Account** scope.
3. Select the incident event types listed above.
4. Copy the signing secret PagerDuty shows once, paste it into Devin, and click "Save".

<Note>
  Disconnecting PagerDuty stops incident events and deletes the webhook subscription Devin created. It does not remove the PagerDuty MCP server.
</Note>

## Setting up the PagerDuty MCP server

The PagerDuty MCP server signs in each member with OAuth. PagerDuty doesn't support automatic OAuth client registration, so an admin registers an OAuth app in PagerDuty and gives Devin its client ID and secret.

### Register an OAuth app in PagerDuty

1. In [Settings > Connections > PagerDuty](https://app.devin.ai/settings/connections/pagerduty), click "Set up with OAuth" in the **MCP server** section. Copy the **OAuth callback URL** shown on the setup page.
2. In PagerDuty, go to **Integrations > App Registration** and click "New App". Enter a name, such as `Devin`, and select **OAuth 2.0**.
3. Select **Scoped OAuth**, and add the OAuth callback URL from Devin as a **Redirect URL**.
4. Under permission scopes, select all **Read Access** scopes. Devin doesn't need write access.
5. Copy the **Selected Permission Scope** value. You'll enter it when you install the MCP server.
6. Register the app, then copy the **client ID** and **client secret**.

### Install the MCP server

1. On the Devin setup page, select the **server URL** for your region: United States (`mcp.pagerduty.com`) or European Union (`mcp.eu.pagerduty.com`).
2. Enter the **OAuth client ID** and **OAuth client secret** from your PagerDuty app.
3. Paste the **Selected Permission Scope** value from your PagerDuty app into **OAuth scope**.
4. Save the installation.

<Note>
  PagerDuty MCP access is always personal. Devin never uses a shared organization token for it. Each member must connect their own PagerDuty user account before Devin can use PagerDuty tools in their sessions.
</Note>

## Connecting your PagerDuty user account

In addition to the organization-level integration, each team member links their own PagerDuty account to their Devin account. This lets Devin use the PagerDuty MCP server as that member. It's also required to create PagerDuty automations.

To connect your user account, go to [Personal Connections](https://app.devin.ai/account/connections), click "Connect" next to PagerDuty, and approve access in PagerDuty. Use a PagerDuty user from the PagerDuty account your organization connected.

## Triggering Devin from PagerDuty

Devin starts working on PagerDuty incidents through [automations](/product-guides/automations). Once PagerDuty is connected, you don't need to set up a separate webhook for each automation.

1. Go to **Automations** and create a new automation.
2. Add a trigger, choose **PagerDuty**, and pick an event:
   * **Incident triggered**: a new incident opens.
   * **Incident acknowledged**: someone acknowledges an incident.
   * **Incident resolved**: an incident is resolved.
   * **Incident updated**: an incident's priority, assignment, or service changes.
3. Optionally add conditions to narrow which incidents match:
   * **Service**, **Team**, and **Priority**: options load from your PagerDuty account.
   * **Urgency** (`high` or `low`) and **Status**.
   * **Title**, **Escalation policy**, and **Assignee**.
   * **Change** (`priority`, `assignment`, or `service`): for **Incident updated** only.
4. Add a **Start session** action with instructions for Devin, and save.

For example, to investigate high-urgency incidents on your checkout service, use the **Incident triggered** event with the conditions **Service** is `checkout-api` and **Urgency** is `high`. Then add a prompt such as: "Investigate this incident. Check recent deploys and error logs for checkout-api, and find the likely root cause."

<Note>
  To create or edit an automation with a PagerDuty trigger, you must [connect your PagerDuty user account](#connecting-your-pagerduty-user-account) first. Your PagerDuty user must belong to the PagerDuty account your organization connected.
</Note>
