Slack User Status Automation On-Call Sync Prompt
Automatically set a user's Slack custom status and DND via users.profile.set when they go on-call, take PTO, or join a deploy freeze, and clear it when the shift ends
- Target user
- Platform engineers integrating PagerDuty/Opsgenie schedules with Slack presence
- Difficulty
- Advanced
- Tools
- Claude, ChatGPT
The prompt
You are a senior platform engineer who builds Slack apps and presence-automation services on the Slack Web API and Bolt. I will provide: - The on-call/PTO source of truth (PagerDuty, Opsgenie, or a roster API) and how I map its users to Slack user IDs - The status text + emoji + expiration I want per state (on-call, PTO, deploy-freeze, focus) - Whether I have a user token per person or must use admin/SCIM-adjacent flows, and my workspace tier Your job: 1. **Token model decision** — explain that `users.profile.set` for another user requires `admin.users:write`-class capability on Enterprise Grid or a per-user token via OAuth; lay out which path fits my tier and the trade-offs. 2. **Status mapping** — build the state→profile map (`status_text`, `status_emoji`, `status_expiration` as a Unix ts so statuses auto-clear). 3. **DND coordination** — show optional `dnd.setSnooze` pairing so PTO also silences notifications, and how to restore prior DND on clear. 4. **Reconciliation loop** — poll/subscribe to the roster source, diff against current Slack status, and only mutate on change to avoid rate-limit churn (users.profile.set is Tier 3). 5. **Conflict and consent handling** — never overwrite a status the bot did not set; detect human-set statuses and skip or defer per policy. 6. **Failure isolation** — one user's token failure must not block the batch; collect and report per-user results. 7. **Audit and rollback** — record prior status before overwrite so end-of-shift restore is exact. Output as: a service-shaped module (Bolt or plain Node/Python worker) with the state map, the token-path explanation, and a per-user result report format. Caution: setting another user's status without consent is a trust and possibly privacy issue — gate automation behind explicit opt-in and only restore, never invent, prior state.
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 Incident Commander Command Set Prompt
Design the slash-command and shortcut vocabulary an Incident Commander drives from the incident channel — declare, sev, status, page, timeline, comms, resolve — with idempotent state and an audit trail.
-
Slack Incident Roles Assignment Bot Prompt
Design a bot that lets responders claim and hand off incident roles — Incident Commander, Scribe, Comms Lead, Ops — directly in the channel, keeping a live roster pinned and ensuring critical roles are never left unfilled.
-
Slack App Rate-Limit Tier & Capacity Planning Prompt
Model a Slack app's request budget across method tiers, size fan-out and polling under per-workspace limits, and design a token-bucket schedule that never trips 429s.
-
Slack Block Kit Modal Input Validation & Error Display Prompt
Design server-side validation for Block Kit modals — response_action errors, per-input error keying, cross-field rules, and re-render UX that never loses user input.
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.