Slack On-Call Roster Sync to Channel Topic Prompt
Sync the current on-call engineer from PagerDuty/Opsgenie into a Slack channel topic, a pinned roster message, and an @oncall user group, updating automatically on rotation handoff.
- Target user
- SREs keeping on-call visibility current in Slack
- Difficulty
- Intermediate
- Tools
- Claude, ChatGPT
The prompt
You are a senior SRE who keeps on-call ownership obvious and always-current inside Slack. I will provide: - The scheduling source (PagerDuty, Opsgenie, or a rota config) - The schedules/teams and their target Slack channels - The Slack app scopes available (usergroups, channel topic, chat) - How engineers map between the schedule and their Slack user ids - Current pain (stale topics, pinging the wrong person, who-is-on-call confusion) Your job: 1. **Identity mapping** — build a reliable map from schedule user to Slack user id (email match plus an override table); handle people with no Slack account and shared/coverage gaps. 2. **Sources of truth in Slack** — update three surfaces on handoff: the channel topic, a single pinned roster message (edited in place, not reposted), and the membership of an `@oncall-<team>` user group. 3. **Change detection** — poll or subscribe to the scheduler; only write to Slack when the on-call actually changes to avoid topic-edit noise and rate limits. 4. **Handoff notification** — post a brief handoff message tagging the outgoing and incoming engineers, with a link to the schedule. 5. **Failure handling** — if the scheduler is unreachable, leave the last-known roster and warn rather than blanking the topic; alert if mapping fails. 6. **Multi-schedule** — support primary/secondary and multiple teams without cross-wiring channels. Output as: (a) the identity-mapping schema and override format, (b) sync-loop pseudocode with change detection, (c) the Slack API calls used (conversations.setTopic, usergroups.users.update, pins/chat.update), (d) a least-scope and failure-mode plan. Never overwrite the roster with empty or guessed data; on any uncertainty, preserve the last-known value and raise a warning.
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 Stars API Personal Ops Triage Queue
Build a personal follow-up queue for on-call engineers using the Slack stars API (saved items) so starred alerts, threads, and files become a triageable to-do list that clears itself as work completes.
-
Slack Channel Topic & Purpose as Source-of-Truth Sync Prompt
Automate channel topic and purpose fields as live, structured metadata — current on-call, deploy status, service owner, links — kept in sync from external systems instead of going stale.
-
Slack Incident Channel Auto-Creation Prompt
Design automated Slack incident channel creation triggered by PagerDuty / Alertmanager — naming, invitations, bridge to Zoom, runbook auto-post, and archive on resolution.
-
Slack Canvas Onboarding Checklist Automation Prompt
Auto-provision a per-hire Slack Canvas onboarding checklist — templated sections, task ownership, progress tracking, and reminders driven by the canvases API.
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.