Teams to PagerDuty Bidirectional Bridge Prompt
Design a two-way Teams to PagerDuty bridge — PD events open an incident channel and post action cards, and Teams card actions ack/resolve/reassign back to PagerDuty with identity mapping and idempotency.
- Target user
- SREs wiring Teams ChatOps to PagerDuty incident lifecycle
- Difficulty
- Advanced
- Tools
- Claude, ChatGPT
The prompt
You are a senior SRE who has built incident bridges that on-call engineers trust enough to drive an incident entirely from Teams. I want a bidirectional Teams ↔ PagerDuty integration with no double-acks and no orphaned channels. I will provide: - PagerDuty config (services, escalation policies, webhook v3 subscriptions, REST API access) - Teams side (bot/app, Graph permissions, how channels are created) - Identity sources (how a Teams user maps to a PD user) - Lifecycle I want mirrored (trigger, ack, resolve, reassign, priority change, notes) Your job: 1. **Inbound: PD → Teams** — handle webhook v3 events (`incident.triggered/acknowledged/resolved/escalated/annotated`). Verify the webhook signature. On trigger, create or reuse a dedicated incident channel, post an adaptive card with severity, service, and Action.Execute buttons (Ack, Resolve, Reassign, Add note). On state changes, update the SAME card/thread rather than spamming. 2. **Outbound: Teams → PD** — card actions call the PD REST API as the acting engineer: ack/resolve via incidents API, reassign by escalation/assignment, notes via the notes endpoint. Return a refreshed card reflecting the new state. 3. **Identity mapping** — resolve the Teams AAD user to a PagerDuty user id (email match + override table); if unmapped, act via a service token but stamp the note with the human's name, and surface a "link your account" card. 4. **Idempotency & loop prevention** — use PD `dedup_key`/incident id + event signature so a PD-originated ack doesn't bounce back as a Teams-originated ack. Track a correlation key per incident in a small store. 5. **Reliability** — retries with backoff, dead-letter for failed deliveries, and reconciliation that re-syncs state if a webhook is missed. 6. **Channel hygiene** — auto-post a resolution summary, pin the timeline, and archive/lock the channel on resolve per policy. Output as: (a) inbound webhook handler with signature verification, (b) outbound action handlers, (c) the identity-mapping + correlation store schema, (d) two adaptive cards (active / resolved), (e) a failure-mode table (missed webhook, unmapped user, duplicate event) with mitigations. Bias toward: idempotency over optimism, acting as the real human, and one living card over a wall of updates.
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
-
Teams Workflows Webhook Payload Transform Builder Prompt
Build and debug the transformation that turns raw monitoring JSON (Alertmanager, Datadog, Grafana, CI webhooks) into the exact message wrapper a Power Automate Workflows 'incoming webhook' expects, so cards post reliably instead of returning 400 or rendering blank.
-
Loop Component (Adaptive Card-Based) for Live Incident Status Prompt
Design a Teams/Microsoft 365 Loop component backed by an Adaptive Card extension so an incident status block stays live and editable wherever it is pasted — chat, email, or a Loop page — without copy-paste drift.
-
In-Meeting Dialog Meeting App with RSC Meeting Scope Prompt
Design a Teams meeting app that opens an in-meeting dialog (TaskModule) during a live incident bridge to capture structured timeline entries, scoped with resource-specific consent so it reads meeting context without broad tenant permissions.
-
Teams Workflow Webhook Adaptive Card Posting Prompt
Build the replacement for retired Office 365 connectors: post adaptive cards into a channel via a Power Automate Workflows 'When a Teams webhook request is received' trigger, including the exact payload shape and auth model.
More Microsoft Teams prompts & error guides
Browse every Microsoft Teams 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.