Skip to main content

PagerDuty ExecModule

Overview

PagerDutyModule connects ValkyrAI workflows to PagerDuty REST API v2 through the native map I/O ExecModule ABI. Workflow Studio discovers it as PagerDutyModule. REST API keys and scoped OAuth tokens resolve only from a bound READY IntegrationAccount; workflow input cannot provide credentials or redirect requests to arbitrary hosts.

The first production operation set focuses on incident detection, triage, accountable mutation, and evidence:

  • discovery: list_services, list_escalation_policies, list_priorities, list_oncalls;
  • incidents: list_incidents, get_incident, create_incident, update_incident;
  • evidence: add_incident_note, list_incident_notes, list_incident_log_entries;
  • identity: get_user.

This surface follows the incident, incident-note, log-entry, and user resources in n8n's PagerDuty node, then adds governed discovery operations useful to agents. List operations use bounded offset pagination. Provider responses and errors are size-limited and redacted. Only GET requests retry automatically; writes run once because their outcome can be ambiguous after a timeout.

Usage

  1. Create a dedicated PagerDuty REST API key or scoped OAuth app for the automation identity.
  2. Grant only the incident, service, escalation-policy, priority, on-call, log-entry, and user access the workflow needs.
  3. Store the token in the encrypted apiKey field of an IntegrationAccount and set the account status to READY.
  4. Put the requester's PagerDuty email in IntegrationAccount.username or accountId, or supply requesterEmail explicitly for a write.
  5. Bind the account through ExecModuleConfig.authConfig.integrationAccount.
  6. Discover IDs with list operations before creating or updating an incident.

Inputs

NameTypeRequirementDefaultDescription and constraints
operationstringRequiredNoneOne of the twelve operations above.
authModestringOptionalapi_tokenapi_token sends Token token=…; oauth2 sends Bearer ….
regionstringOptionalusus or eu; selects a fixed PagerDuty API origin.
incidentIdstringIncident, note, or incident-log operationsNonePagerDuty ID, 1–64 letters, digits, _, or -.
serviceIdstringcreate_incident; optional list filter array uses serviceIdsNoneValid bounded PagerDuty ID.
userIdstringget_userNoneValid bounded PagerDuty ID.
requesterEmailstringWrite operationsAccount identityValid email used in PagerDuty's From header.
titlestringcreate_incident; optional updateNone1–1,024 characters.
statusValuestringOptional updateNonetriggered, acknowledged, or resolved.
urgencystringOptional create/update/filterNonehigh or low.
detailsstringOptional create/updateNoneIncident body, maximum 20,000 characters.
resolutionstringOptional updateNoneResolution summary, maximum 10,000 characters.
incidentKeystringOptional createNoneCaller-owned correlation key, maximum 255 characters.
escalationPolicyIdstringOptional create/updateNoneValid escalation-policy ID.
priorityIdstringOptional create/updateNoneValid priority ID.
notestringadd_incident_noteNone1–10,000 characters.
incidentobject or JSON stringOptional create/updateNoneAllowlisted incident fields only; 256 KiB cap.
statusesarray or JSON stringOptional incident listNoneUp to three supported statuses.
serviceIds, teamIds, userIdsarrays or JSON stringsOptional list filtersNoneUp to 100 valid PagerDuty IDs per filter.
since, untilstringsOptional list filtersNoneProvider-compatible time filters, maximum 64 characters.
offsetintegerOptional list continuation0Starting offset from 0 through 1,000,000.
limitintegerOptional100Maximum returned resources, 1–10,000.
returnAllbooleanOptionalfalseFollow offset pages to exhaustion or the 10,000-item cap.
requestIdstringOptionalNoneCaller correlation value sent as X-Request-Id, maximum 128 characters.

Typed inputs override matching allowlisted fields. Create accepts type, title, service, urgency, body, escalation_policy, priority, and incident_key; required title and serviceId are always rebuilt from validated inputs. Update accepts type, title, status, urgency, body, escalation_policy, priority, assignments, and resolution. Reference objects must contain only validated id and type fields.

Outputs

NameTypeWhen presentDescription
statusstringAlwayssuccess or error.
operationstringAlwaysNormalized operation name.
attemptsintegerAlwaysTotal provider attempts across pages.
httpStatusintegerProvider respondedLast PagerDuty HTTP status.
dataobjectSingle-resource/mutation successProvider incident, note, or user.
id, providerStatus, incident_numberstringProvider returns fieldSafe convenience fields; providerStatus never replaces the module success state.
items / countarray / integerList successBounded provider resources and emitted count.
hasMore / nextOffsetboolean / integerList successProvider continuation state.
requestIdstringProvider supplies oneSafe provider trace reference.
errorobjectFailureSafe {code, message, httpStatus?, retryable} details.

Tokens and authorization headers never enter outputs. Provider messages pass through ValkyrAI's shared workflow sensitive-data policy.

IntegrationAccount Requirements

SettingRequirement
ProviderPagerDuty REST API v2
AuthenticationREST API key (Token token=…) or scoped OAuth (Bearer …)
accountNameHuman-readable automation identity
username or accountIdPagerDuty requester email used for writes, unless supplied per call
apiKeyPreferred encrypted SecureField containing the token
passwordEncrypted fallback only; prefer apiKey
statusMust be READY

Use the least-privilege token that can read the discovery/evidence resources and mutate incidents only when the workflow requires writes. Read-only PagerDuty keys cannot create incidents, add notes, acknowledge, or resolve incidents. OAuth refresh and token rotation belong to the platform IntegrationAccount lifecycle, never workflow inputs.

Configuration

{
"version": "1.0.0",
"authConfig": {
"authStrategy": 1,
"integrationAccount": "integration-account:pagerduty-incident-automation"
},
"retryPolicy": {
"maxAttempts": 3,
"backoffStrategy": "EXPONENTIAL",
"initialDelayMs": 1000,
"maxDelayMs": 60000,
"jitter": false
},
"executionConfig": {"timeoutMs": 30000},
"payloadConfig": {
"parameters": "{\"operation\":\"list_incidents\",\"statuses\":[\"triggered\",\"acknowledged\"],\"urgency\":\"high\",\"limit\":100}"
}
}

The integration-account value is symbolic. Persisted workflows use the generated relationship and never a plaintext token.

Operations

OperationPagerDuty behaviorSide effect
list_servicesLists services visible to the token.Read-only; safe retries.
list_escalation_policiesLists available escalation policies.Read-only; safe retries.
list_prioritiesLists configured incident priorities.Read-only; safe retries.
list_oncallsLists current on-call entries with bounded filters.Read-only; safe retries.
list_incidentsLists incidents with bounded status, urgency, identity, service, and time filters.Read-only; safe retries.
get_incidentReads one incident.Read-only; safe retries.
create_incidentCreates one incident for a validated service and requester.New incident; single attempt.
update_incidentUpdates allowlisted incident state, assignment, urgency, references, or resolution.Audit mutation; single attempt.
add_incident_noteAdds one bounded note to an incident.New evidence record; single attempt.
list_incident_notesLists incident notes.Read-only; safe retries.
list_incident_log_entriesLists incident log evidence.Read-only; safe retries.
get_userReads one PagerDuty user.Read-only; safe retries.

Errors and Failure Modes

CodeTypical causeRetryableResolution
VALIDATION_ERRORMissing/invalid account, email, ID, filter, JSON, reference, or incident mutation.NoCorrect input; no unsafe request was sent.
UNSUPPORTED_OPERATIONUnknown operation.NoSelect a documented operation.
INTEGRATION_ACCOUNT_REQUIREDNo bound account.NoBind a PagerDuty IntegrationAccount.
INTEGRATION_ACCOUNT_NOT_READYAccount is not READY.NoRepair or reconnect the account.
PAGERDUTY_HTTP_400Provider rejected a filter, header, or payload.NoCorrect the bounded request.
PAGERDUTY_HTTP_401 / 403Token invalid, expired, read-only, or missing access.NoRotate the token or grant minimum access.
PAGERDUTY_HTTP_404Resource is absent or invisible.NoRe-run discovery with the same account.
PAGERDUTY_HTTP_429 / 5xxRate limit or transient provider failure.Yes for readsHonor provider timing; reconcile writes before retrying.
NETWORK_ERRORTimeout, DNS, TLS, or connectivity failure.Yes for readsVerify connectivity; inspect PagerDuty state before repeating a write.
RESPONSE_TOO_LARGEResponse exceeded 5 MiB.NoNarrow filters or lower the limit.
INVALID_PROVIDER_RESPONSEExpected resource wrapper is absent or pagination is contradictory.NoUse requestId and verify API compatibility.

Example

Acknowledge a verified incident after an automated triage workflow identifies the active service owner:

{
"operation": "update_incident",
"incidentId": "P123ABC",
"statusValue": "acknowledged",
"requesterEmail": "ops@example.com",
"requestId": "api-0-triage-20260810"
}

Expected result:

{
"status": "success",
"operation": "update_incident",
"attempts": 1,
"httpStatus": 200,
"id": "P123ABC",
"data": {
"id": "P123ABC",
"incident_number": 1842,
"status": "acknowledged"
}
}

Notes

  • Pagination: PagerDuty lists use offset, limit, and more. Pages request at most 100 items and total output never exceeds 10,000. An empty page with more: true fails closed.
  • Rate limits: reads retry HTTP 408, 429, 500, 502, 503, and 504 according to RetryPolicy, honoring Retry-After and PagerDuty's ratelimit-reset delay. Writes never retry automatically.
  • API limits: provider responses are capped at 5 MiB, structured incident bodies at 256 KiB, ID filter arrays at 100 entries, and text fields at their documented module bounds. Provider account limits still apply.
  • Idempotency: creates, incident updates, and notes are single-attempt. Use incidentKey and requestId; reconcile the incident or log entries before repeating any request whose response was lost.
  • Destructive behavior: this release exposes no deletion. Resolving an incident is an audited state change and requires an explicit update_incident; it is not treated as a read retry.
  • Security: credentials remain in IntegrationAccount SecureFields. Fixed regional hosts, encoded path segments, allowlisted payloads, explicit requester identity, bounded responses, and redacted errors prevent arbitrary routing or token reflection.
  • External verification: request construction, pagination, validation, retry safety, redaction, payload mapping, and metadata discovery are deterministic local tests. Live PagerDuty roles, scopes, schedules, escalation, account features, and incident behavior require separately authorized provider credentials and are not exercised in repository tests.
  • Deferred operations: schedules, teams, maintenance windows, alert grouping, event ingestion, response plays/workflows, analytics, status dashboards, webhooks/triggers, OAuth refresh, and arbitrary raw requests.
  • Functional references: n8n PagerDuty node source, PagerDuty API access keys, and PagerDuty REST API rate limits.