Skip to main content

PagerDuty in Novu is routed per subscriber. Each subscriber brings their own Events API v2 integration key, so one workflow trigger can page different PagerDuty services and escalation policies for different recipients. The integration itself never stores a routing key. It acts as the anchor that per-subscriber channel endpoints hang off of.

Note

There is no shared, environment-level PagerDuty routing key. If a subscriber has no PagerDuty endpoint registered, the Tool step is marked skipped for that subscriber; no incident is created and no error is raised.

Prerequisites#

  • A PagerDuty account with permission to add integrations to services
  • A PagerDuty service to page (create one under Services → Service Directory if needed)
  • Access to the Novu dashboard

Get an Events API v2 routing key#

Every subscriber routes to their own PagerDuty service, so each subscriber needs a routing key from their service.

Open the service in PagerDuty

In PagerDuty, go to Services → Service Directory and open the service you want Novu to page.

Add an Events API v2 integration

Open the Integrations tab, click Add another integration, choose Events API v2, and save.

Copy the integration key

PagerDuty generates a 32-character alphanumeric Integration Key. Copy it. This is the routing key Novu will store for the subscriber.

Warning

The routing key grants the ability to create incidents on the service. Treat it like a password: keep it on your server, never embed it in client-side code, and never log it.

Add PagerDuty in Novu#

Open the Integrations Store

In the Novu dashboard, click Integrations Store in the sidebar.

Add PagerDuty

Click Connect Provider, select Tool, then choose PagerDuty.

Create the integration

PagerDuty has no environment-level credentials, so there is nothing to paste on this screen. Click Create Integration to save it. This gives you the integrationIdentifier you’ll reference below when registering subscribers’ routing keys.

Store a subscriber’s routing key#

Register each subscriber’s routing key as a channel endpoint on the PagerDuty integration. Novu encrypts the routing key at rest on ChannelEndpoint.endpoint and returns the wire shape { routingKey, region } on reads (region stays plaintext).

Warning

Registering an endpoint requires your Novu secret key. Always call the channel-endpoints API from your server, never from a browser or mobile client. A typical flow is: your app UI sends the routing key to your backend, and your backend forwards it to Novu.

Create the endpoint#

Send the routing key as a pagerduty_service endpoint. Set createSubscriberIfMissing: true so this call also provisions the Novu subscriber the first time an end user connects PagerDuty, with no separate identify call required.

Endpoint shape#

FieldTypeDescription
type"pagerduty_service"Discriminator for the endpoint variant.
integrationIdentifierstringIdentifier of the PagerDuty integration created in the Integrations Store.
subscriberIdstringThe subscriber to page when a workflow selects this endpoint.
createSubscriberIfMissingbooleanOptional. When true, Novu creates the subscriber on the fly if it does not exist yet. Existing subscribers are never modified. Defaults to false.
endpoint.routingKeystringThe 32-character Events API v2 integration key from PagerDuty. Stored encrypted.
endpoint.region"us" | "eu"Selects the PagerDuty data-center endpoint (events.pagerduty.com vs events.eu.pagerduty.com).

One endpoint per subscriber, per integration#

A subscriber may have at most one PagerDuty endpoint per integration. A second POST with the same (subscriberId, integrationIdentifier) returns 409 Conflict. Rotate the routing key by PATCHing the existing endpoint instead:

Reading and disconnecting#

Reads return the full wire shape (including the routing key), so you can display connection status. Mask it in your UI (the Novu dashboard shows only the last four characters).

Delete the endpoint to disconnect a subscriber. This removes the encrypted routing key stored on the endpoint:

Page a subscriber from a workflow#

Once a subscriber has a PagerDuty endpoint, add a Tool step with PagerDuty to your workflow and trigger it like any other workflow.

Add a Tool step

In the workflow editor, add a step and select Tool as the channel. Choose the PagerDuty integration you created.

Write the incident summary

The step content becomes the incident payload.summary in the PagerDuty Events API v2 request. Use dynamic placeholders such as {{payload.orderNumber}} or {{subscriber.firstName}}.

Trigger the workflow

Send a trigger for a subscriber who has connected PagerDuty. Novu resolves that subscriber’s routing key and creates an incident on their PagerDuty service.

Incident payload defaults and overrides#

FieldDefaultOverride with
event_actiontriggerStep control (trigger, acknowledge, resolve).
payload.summaryStep contentStep content or a summary override on the step.
payload.severitycriticalseverity step override (critical, error, warning, info).
payload.sourcenovusource step override.
dedup_keyDeterministic, derived from the workflow transactionId, subscriberId, and step ID.Explicit dedup_key step override.
payload.custom_detailsAny extra keys you pass on the step (excluding reserved names).Step overrides.

The deterministic dedup_key means Novu retries for the same step will update the same PagerDuty incident instead of creating duplicates.

What happens without an endpoint#

If a workflow triggers for a subscriber who has no PagerDuty endpoint on the target integration, Novu marks the step as skipped in the Activity feed for that subscriber and does not create an incident. Other subscribers on the same trigger are unaffected. Each is routed to their own PagerDuty service.