Slack to PagerDuty Bidirectional Bridge Prompt
Design a two-way Slack to PagerDuty integration where Slack actions (ack, escalate, resolve) drive PagerDuty incidents and PagerDuty state changes flow back into the Slack channel.
- Target user
- SREs wiring incident tooling to ChatOps
- Difficulty
- Advanced
- Tools
- Claude, ChatGPT
The prompt
You are an incident-tooling engineer who has built a production Slack ↔ PagerDuty bridge that on-call engineers trust enough to drive an incident entirely from Slack. I will provide: - PagerDuty setup (services, escalation policies, API/v3 access) - Slack app capabilities and the incident channel convention - What actions we want from Slack (ack, reassign, escalate, add note, resolve) - What PagerDuty events we want reflected back into Slack Your job: 1. **Identity mapping** — map Slack `user_id` ↔ PagerDuty `user_id` reliably (email match with a fallback table). This is the crux; an action in Slack must attribute to the right PagerDuty user. 2. **Slack → PagerDuty (write path)** — Block Kit buttons that call the PagerDuty REST API: acknowledge, add note, reassign (user select), escalate (bump policy level), resolve. Specify required scopes and the `From` header. Handle partial failures and show the result inline. 3. **PagerDuty → Slack (read path)** — consume PagerDuty webhooks (v3): `incident.triggered/acknowledged/escalated/resolved` and `incident.responder.added`. Post or update the Slack message and thread so state stays in sync without spamming. 4. **Single source of truth & loops** — decide PagerDuty as the system of record. Prevent echo loops: a Slack-initiated ack that fires a PD webhook should not re-post as if it were external. 5. **Idempotency & ordering** — webhooks can retry and arrive out of order; key updates by incident id + status + timestamp and ignore stale transitions. 6. **Security** — verify PagerDuty webhook signatures and Slack signatures; store the PD API token least-privilege; never let an unauthorized Slack user resolve another team's incident. 7. **Failure modes** — PD API down, Slack rate-limited, mapping miss; degrade gracefully and surface a clear error rather than silently dropping an ack. Output as: (a) a sequence diagram for one incident's full lifecycle across both systems, (b) the Slack action handlers calling PD, (c) the PD webhook consumer updating Slack, (d) the identity-mapping module, (e) a test plan covering loop prevention and out-of-order webhooks. Bias toward: PagerDuty as source of truth, strict loop prevention, and correct user attribution on every action.
Run this prompt with AI
Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.
Related prompts
-
Slack Alert Routing & Escalation Design Prompt
Design severity-aware Slack alert routing — channel taxonomy, on-call rotations, escalation timing, alert suppression, and runbook linking.
-
Slack Calls API External Provider Integration Prompt
Register and manage third-party voice/video calls inside Slack via the Calls API (calls.add, calls.participants.add/remove, calls.end) so an incident bridge from an external provider appears natively in the channel
-
Slack Remote Files API External Artifact Pointers Prompt
Use the files.remote API to surface large external artifacts (build logs, traces, S3 objects) as native, unfurlable Slack file entries without uploading the bytes, keeping a live pointer that stays in sync with the source
-
Slack Incident Severity Classifier Bot Prompt
Build a Slack bot that reads an incident's opening signal (alert payload, reporter message, affected service) and proposes a severity level with a transparent rationale, so on-call doesn't under- or over-page.
More Slack prompts & error guides
Browse every Slack prompt and troubleshooting guide in one place.
Reading prompts? Get all 500 in one free PDF
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.