Skip to content
🎉 Launch sale:50% off everything over $22 — automatically applied at checkout· ends Aug 2Shop the sale →
DevOps AI ToolKit
Newsletter
All prompts
AI for Slack Difficulty: Advanced ClaudeChatGPT

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

More Slack prompts & error guides

Browse every Slack prompt and troubleshooting guide in one place.

Free download · 368-page PDF

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.