> For the complete documentation index, see llms.txt.
Skip to main content

Check out Port for yourself ➜ 

Manage incident lifecycle

This guide demonstrates how to manage the PagerDuty incident lifecycle from Port with governed self-service actions.

We will create actions to acknowledge, escalate, and resolve PagerDuty incidents. Each action can run through a synced webhook for a lightweight setup, or through a GitHub workflow when you want the automation logic in Git.

Common use cases

  • Give responders a single place in Port to update PagerDuty incidents.
  • Keep PagerDuty incident status, urgency, assignee, escalation policy, and timestamps synced back to Port.
  • Offer both no-code synced webhook actions and GitHub workflow-backed actions for incident operations.

Prerequisites

If you use the GitHub workflow backend, install one of the following GitHub integrations:

Set up data model

If you installed the PagerDuty integration, the service and incident blueprints are already available in Port. If you did not install the integration, create the blueprints manually.

Create the PagerDuty service blueprint

  1. Go to the Builder page.

  2. Click + Blueprint.

  3. Click Edit JSON.

  4. Copy and paste the following JSON configuration into the editor:

    PagerDuty service blueprint (Click to expand)
    {
    "identifier": "pagerdutyService",
    "description": "This blueprint represents a PagerDuty service in our Port catalog",
    "title": "PagerDuty service",
    "icon": "pagerduty",
    "schema": {
    "properties": {
    "status": {
    "title": "Status",
    "type": "string",
    "enum": [
    "active",
    "warning",
    "critical",
    "maintenance",
    "disabled"
    ],
    "enumColors": {
    "active": "green",
    "warning": "yellow",
    "critical": "red",
    "maintenance": "lightGray",
    "disabled": "darkGray"
    }
    },
    "url": {
    "title": "URL",
    "type": "string",
    "format": "url"
    },
    "oncall": {
    "title": "On Call",
    "type": "string",
    "format": "user"
    },
    "meanSecondsToResolve": {
    "title": "Mean Seconds to Resolve",
    "type": "number"
    },
    "meanSecondsToFirstAck": {
    "title": "Mean Seconds to First Acknowledge",
    "type": "number"
    },
    "meanSecondsToEngage": {
    "title": "Mean Seconds to Engage",
    "type": "number"
    }
    },
    "required": []
    },
    "mirrorProperties": {},
    "calculationProperties": {},
    "relations": {}
    }
  5. Click Save.

Create the PagerDuty incident blueprint

  1. Go to the Builder page.

  2. Click + Blueprint.

  3. Click Edit JSON.

  4. Copy and paste the following JSON configuration into the editor:

    PagerDuty incident blueprint (Click to expand)
    {
    "identifier": "pagerdutyIncident",
    "description": "This blueprint represents a PagerDuty incident in our Port catalog",
    "title": "PagerDuty incident",
    "icon": "pagerduty",
    "schema": {
    "properties": {
    "status": {
    "type": "string",
    "title": "Incident Status",
    "enum": [
    "triggered",
    "annotated",
    "acknowledged",
    "reassigned",
    "escalated",
    "reopened",
    "resolved"
    ]
    },
    "url": {
    "type": "string",
    "format": "url",
    "title": "Incident URL"
    },
    "urgency": {
    "type": "string",
    "title": "Incident Urgency",
    "enum": ["high", "low"]
    },
    "responder": {
    "type": "string",
    "title": "Assignee"
    },
    "escalation_policy": {
    "type": "string",
    "title": "Escalation Policy"
    },
    "created_at": {
    "title": "Created at",
    "type": "string",
    "format": "date-time"
    },
    "updated_at": {
    "title": "Updated at",
    "type": "string",
    "format": "date-time"
    }
    },
    "required": []
    },
    "mirrorProperties": {},
    "calculationProperties": {},
    "relations": {
    "pagerdutyService": {
    "title": "PagerDuty service",
    "target": "pagerdutyService",
    "required": false,
    "many": true
    }
    }
    }
  5. Click Save.

Acknowledge incidents

Acknowledging an incident changes its status in PagerDuty to acknowledged and syncs the updated incident entity back to Port.

Add Port secrets

Existing secrets

If you have already installed Port's PagerDuty integration, these secrets should already exist in your portal.
To view your existing secrets:

  1. In your Port application, click on your profile picture .
  2. Choose Credentials, then click on the Secrets tab.

Add the following secret to Port before creating the synced webhook action:

Set up self-service action

Follow the steps below to create a self-service action that uses a synced webhook.

  1. Go to the Self-service page of your portal.

  2. Click on the + New Action button.

  3. Click on the {...} Edit JSON button.

  4. Copy and paste the following JSON configuration into the editor:

    Acknowledge incident webhook action (Click to expand)
    {
    "identifier": "pagerdutyIncident_acknowledge_incident_webhook",
    "title": "Acknowledge incident (webhook)",
    "icon": "pagerduty",
    "description": "Acknowledge a PagerDuty incident using a synced webhook",
    "trigger": {
    "type": "self-service",
    "operation": "DAY-2",
    "userInputs": {
    "properties": {
    "from": {
    "icon": "User",
    "title": "From",
    "description": "User email",
    "type": "string",
    "format": "user"
    }
    },
    "required": [
    "from"
    ],
    "order": [
    "from"
    ]
    },
    "blueprintIdentifier": "pagerdutyIncident"
    },
    "invocationMethod": {
    "type": "WEBHOOK",
    "url": "https://api.pagerduty.com/incidents",
    "agent": false,
    "synchronized": true,
    "method": "PUT",
    "headers": {
    "Content-Type": "application/json",
    "Accept": "application/vnd.pagerduty+json;version=2",
    "Authorization": "Token token={{.secrets.PAGERDUTY_API_KEY}}",
    "From": "{{.inputs.from}}"
    },
    "body": {
    "incidents": [
    {
    "id": "{{.entity.identifier}}",
    "type": "incident_reference",
    "status": "acknowledged"
    }
    ]
    }
    },
    "requiredApproval": false
    }
  5. Click Save to create the action.

Create automation

Create an automation that updates the PagerDuty incident entity in Port after the synced webhook action succeeds.

  1. Go to the Automations page of your portal.

  2. Click on the + Automation button.

  3. Copy and paste the following JSON configuration into the editor:

    Sync acknowledged PagerDuty incident automation (Click to expand)
    {
    "identifier": "pagerdutyIncident_sync_acknowledged_status",
    "title": "Sync acknowledged PagerDuty incident status",
    "description": "Update PagerDuty incident data in Port after acknowledgment",
    "trigger": {
    "type": "automation",
    "event": {
    "type": "RUN_UPDATED",
    "actionIdentifier": "pagerdutyIncident_acknowledge_incident_webhook"
    },
    "condition": {
    "type": "JQ",
    "expressions": [
    ".diff.after.status == \"SUCCESS\""
    ],
    "combinator": "and"
    }
    },
    "invocationMethod": {
    "type": "UPSERT_ENTITY",
    "blueprintIdentifier": "pagerdutyIncident",
    "mapping": {
    "identifier": "{{.event.diff.after.entity.identifier}}",
    "title": "{{ .event.diff.after.entity.title }}",
    "properties": {
    "status": "{{.event.diff.after.response.incidents.0.status}}",
    "url": "{{.event.diff.after.response.incidents.0.self}}",
    "urgency": "{{.event.diff.after.response.incidents.0.urgency}}",
    "responder": "{{.event.diff.after.response.incidents.0.assignments.0.assignee.summary}}",
    "escalation_policy": "{{.event.diff.after.response.incidents.0.escalation_policy.summary}}",
    "created_at": "{{.event.diff.after.response.incidents.0.created_at}}",
    "updated_at": "{{.event.diff.after.response.incidents.0.updated_at}}"
    },
    "relations": {
    "pagerdutyService": ["{{.event.diff.after.response.incidents.0.service.id}}"]
    }
    }
    },
    "publish": true
    }
  4. Click Save to create the automation.

Test the flow

  1. Go to the Self-service page of your portal.

  2. Click the Acknowledge incident (webhook) action.

  3. Choose the PagerDuty incident you want to acknowledge.

  4. Enter the email address of a valid PagerDuty user.

  5. Click Execute.

  6. Confirm that the incident status changes to acknowledged in PagerDuty and Port.

Escalate incidents

Escalating an incident updates its escalation policy and urgency in PagerDuty, then syncs the latest incident details back to Port.

Add Port secrets

Existing secrets

If you have already installed Port's PagerDuty integration, these secrets should already exist in your portal.
To view your existing secrets:

  1. In your Port application, click on your profile picture .
  2. Choose Credentials, then click on the Secrets tab.

Add the following secret to Port before creating the synced webhook action:

Set up self-service action

Follow the steps below to create a self-service action that uses a synced webhook.

  1. Go to the Self-service page of your portal.

  2. Click on the + New Action button.

  3. Click on the {...} Edit JSON button.

  4. Copy and paste the following JSON configuration into the editor:

    Escalate incident webhook action (Click to expand)
    {
    "identifier": "pagerdutyIncident_escalate_incident_webhook",
    "title": "Escalate incident (webhook)",
    "icon": "pagerduty",
    "description": "Escalate a PagerDuty incident",
    "trigger": {
    "type": "self-service",
    "operation": "DAY-2",
    "userInputs": {
    "properties": {
    "escalation_policy_id": {
    "title": "Escalation policy ID",
    "description": "PagerDuty escalation policy ID (e.g., P7LVMYP)",
    "icon": "pagerduty",
    "type": "string"
    },
    "urgency": {
    "icon": "pagerduty",
    "title": "Urgency",
    "description": "New urgency level for the incident",
    "type": "string",
    "default": "low",
    "enum": [
    "high",
    "low"
    ],
    "enumColors": {
    "high": "orange",
    "low": "lightGray"
    }
    },
    "from": {
    "icon": "User",
    "title": "From",
    "description": "The email address of a valid PagerDuty user associated with the account making the request.",
    "type": "string",
    "format": "user",
    "default": {
    "jqQuery": ".user.email"
    }
    }
    },
    "required": [
    "escalation_policy_id",
    "urgency",
    "from"
    ],
    "order": [
    "escalation_policy_id",
    "urgency",
    "from"
    ]
    },
    "blueprintIdentifier": "pagerdutyIncident"
    },
    "invocationMethod": {
    "type": "WEBHOOK",
    "url": "https://api.pagerduty.com/incidents/{{.entity.identifier}}",
    "agent": false,
    "synchronized": true,
    "method": "PUT",
    "headers": {
    "Authorization": "Token token={{.secrets.PAGERDUTY_API_KEY}}",
    "Accept": "application/vnd.pagerduty+json;version=2",
    "From": "{{.inputs.from}}",
    "Content-Type": "application/json"
    },
    "body": {
    "incident": {
    "type": "incident_reference",
    "escalation_policy": {
    "id": "{{.inputs.escalation_policy_id}}",
    "type": "escalation_policy_reference"
    },
    "urgency": "{{.inputs.urgency}}"
    }
    }
    },
    "requiredApproval": false
    }
  5. Click Save to create the action.

Create automation

Create an automation that updates the PagerDuty incident entity in Port after the synced webhook action succeeds.

  1. Go to the Automations page of your portal.

  2. Click on the + Automation button.

  3. Copy and paste the following JSON configuration into the editor:

    Sync escalated PagerDuty incident automation (Click to expand)
    {
    "identifier": "pagerdutyIncident_sync_escalated_status",
    "title": "Sync escalated PagerDuty incident status",
    "description": "Update PagerDuty incident data in Port after escalation",
    "trigger": {
    "type": "automation",
    "event": {
    "type": "RUN_UPDATED",
    "actionIdentifier": "pagerdutyIncident_escalate_incident_webhook"
    },
    "condition": {
    "type": "JQ",
    "expressions": [
    ".diff.after.status == \"SUCCESS\""
    ],
    "combinator": "and"
    }
    },
    "invocationMethod": {
    "type": "UPSERT_ENTITY",
    "blueprintIdentifier": "pagerdutyIncident",
    "mapping": {
    "identifier": "{{.event.diff.after.response.incident.id}}",
    "title": "{{.event.diff.after.response.incident.title}}",
    "properties": {
    "status": "{{.event.diff.after.response.incident.status}}",
    "url": "{{.event.diff.after.response.incident.self}}",
    "urgency": "{{.event.diff.after.response.incident.urgency}}",
    "responder": "{{.event.diff.after.response.incident.assignments.0.assignee.summary}}",
    "escalation_policy": "{{.event.diff.after.response.incident.escalation_policy.summary}}",
    "created_at": "{{.event.diff.after.response.incident.created_at}}",
    "updated_at": "{{.event.diff.after.response.incident.updated_at}}"
    },
    "relations": {
    "pagerdutyService": ["{{.event.diff.after.response.incident.service.id}}"]
    }
    }
    },
    "publish": true
    }
  4. Click Save to create the automation.

Test the flow

  1. Go to the Self-service page of your portal.

  2. Click the Escalate incident (webhook) action.

  3. Choose the PagerDuty incident you want to escalate.

  4. Enter the escalation policy ID, urgency level, and email address of a valid PagerDuty user.

  5. Click Execute.

  6. Confirm that the incident escalation policy and urgency are updated in PagerDuty and Port.

Resolve incidents

Resolving an incident changes its status in PagerDuty to resolved and syncs the updated incident entity back to Port.

Add Port secrets

Existing secrets

If you have already installed Port's PagerDuty integration, these secrets should already exist in your portal.
To view your existing secrets:

  1. In your Port application, click on your profile picture .
  2. Choose Credentials, then click on the Secrets tab.

Add the following secret to Port before creating the synced webhook action:

Set up self-service action

Follow the steps below to create a self-service action that uses a synced webhook.

  1. Go to the Self-service page of your portal.

  2. Click on the + New Action button.

  3. Click on the {...} Edit JSON button.

  4. Copy and paste the following JSON configuration into the editor:

    Resolve incident webhook action (Click to expand)
    {
    "identifier": "pagerdutyIncident_resolve_incident_webhook",
    "title": "Resolve incident (webhook)",
    "icon": "pagerduty",
    "description": "Resolve a PagerDuty incident",
    "trigger": {
    "type": "self-service",
    "operation": "DAY-2",
    "userInputs": {
    "properties": {
    "from": {
    "icon": "User",
    "title": "From",
    "description": "The email address of a valid PagerDuty user associated with the account making the request.",
    "type": "string",
    "format": "user",
    "default": {
    "jqQuery": ".user.email"
    }
    }
    },
    "required": [
    "from"
    ],
    "order": [
    "from"
    ]
    },
    "blueprintIdentifier": "pagerdutyIncident"
    },
    "invocationMethod": {
    "type": "WEBHOOK",
    "url": "https://api.pagerduty.com/incidents",
    "agent": false,
    "synchronized": true,
    "method": "PUT",
    "headers": {
    "Authorization": "Token token={{.secrets.PAGERDUTY_API_KEY}}",
    "Accept": "application/vnd.pagerduty+json;version=2",
    "From": "{{.inputs.from}}",
    "Content-Type": "application/json"
    },
    "body": {
    "incidents": [
    {
    "id": "{{.entity.identifier}}",
    "type": "incident_reference",
    "status": "resolved"
    }
    ]
    }
    },
    "requiredApproval": false
    }
  5. Click Save to create the action.

Create automation

Create an automation that updates the PagerDuty incident entity in Port after the synced webhook action succeeds.

  1. Go to the Automations page of your portal.

  2. Click on the + Automation button.

  3. Copy and paste the following JSON configuration into the editor:

    Sync resolved PagerDuty incident automation (Click to expand)
    {
    "identifier": "pagerdutyIncident_sync_resolved_status",
    "title": "Sync resolved PagerDuty incident status",
    "description": "Update PagerDuty incident data in Port after resolution",
    "trigger": {
    "type": "automation",
    "event": {
    "type": "RUN_UPDATED",
    "actionIdentifier": "pagerdutyIncident_resolve_incident_webhook"
    },
    "condition": {
    "type": "JQ",
    "expressions": [
    ".diff.after.status == \"SUCCESS\""
    ],
    "combinator": "and"
    }
    },
    "invocationMethod": {
    "type": "UPSERT_ENTITY",
    "blueprintIdentifier": "pagerdutyIncident",
    "mapping": {
    "identifier": "{{.event.diff.after.entity.identifier}}",
    "title": "{{.event.diff.after.entity.title}}",
    "properties": {
    "status": "resolved",
    "updated_at": "{{.event.diff.after.endedAt}}"
    }
    }
    },
    "publish": true
    }
  4. Click Save to create the automation.

Test the flow

  1. Go to the Self-service page of your portal.

  2. Click the Resolve incident (webhook) action.

  3. Choose the PagerDuty incident you want to resolve.

  4. Enter the email address of a valid PagerDuty user.

  5. Click Execute.

  6. Confirm that the incident status changes to resolved in PagerDuty and Port.

More relevant guides