Slack Seat and Usage Cost Reporting Bot
Design a scheduled bot that pulls Slack Enterprise/Business+ admin usage and billing data, computes seat cost and inactive-seat waste, and posts a weekly FinOps digest to a Slack channel with reclaim recommendations.
- Target user
- Platform and FinOps engineers accountable for Slack seat spend across a large workspace or Enterprise Grid
- Difficulty
- Advanced
- Tools
- Claude, ChatGPT, Cursor
The prompt
You are a platform engineer who owns the Slack bill and has automated seat/usage reporting so leadership sees cost, growth, and reclaimable inactive seats every week without anyone opening the admin console. I will provide: - The plan tier (Business+ or Enterprise Grid) and whether an org-level admin token is available - The seat/user cost inputs (per-seat price, contract terms) - The channel to post the digest to and the cadence - What "inactive" means for us (e.g. no activity 30+ days) Your job: 1. **Data sources** — identify the right admin methods and their scopes: `admin.users.list` (members, activity, guest vs full), `team.billing.info` (billable info), `admin.teams.list` (Grid workspaces), and where relevant the analytics/member data export. State the required scopes (`admin.users:read`, `admin.teams:read`, etc.) and that these need an org/workspace admin token, NOT a normal bot token — calling them with an ordinary token returns `not_allowed_token_type` or `missing_scope`. 2. **Collect & normalize** — page through `admin.users.list` with `cursor`, classify each member (active/deactivated, full/guest/bot, last-activity), and join against your per-seat cost input. Handle Grid by iterating `team_id` across workspaces. Show the paginated fetch with rate-limit backoff. 3. **Compute the metrics** — total billable seats, month-over-month seat growth, seats with no activity in the inactive window (reclaim candidates), guest-seat count, and estimated monthly/annual cost = billable_seats * per_seat_price. Show the calculation and reclaim-savings estimate. 4. **Render the digest** — a Block Kit message with headline cost, a delta vs last week, a table of top reclaim candidates (name, last active, cost), and an "Export full list" button/file. Keep it scannable for non-engineers. 5. **Reclaim workflow** — for inactive seats, offer an action that opens a modal to deactivate or flag a user (with an approval/audit step), or exports the list to the IT ticketing queue. Never auto-deactivate silently. 6. **Schedule & persist** — run on a weekly timer, persist each run's snapshot so week-over-week deltas are real, and store snapshots keyed by date. Show the scheduled-job skeleton. 7. **Guardrails** — treat member data as sensitive (names, activity, employment signals). Restrict the posting channel, redact where possible, and log who viewed/exported. Output as: (a) the scope/token requirements and a note on the admin-token gotcha, (b) the paginated `admin.users.list` + `team.billing.info` collectors with backoff, (c) the cost/inactive-seat computation, (d) the Block Kit digest payload, (e) the reclaim modal + audit step, (f) the weekly scheduler with snapshot persistence. Bias toward: never auto-deactivating a human's account, treating member activity data as sensitive HR-adjacent data, and grounding every cost number in the actual per-seat price rather than guessing.
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 team.accessLogs Login Anomaly Monitor Prompt
Build a bot that polls team.accessLogs to detect suspicious workspace sign-ins — new IPs, new countries, stale user agents, brute-force bursts — and routes scored alerts to a security channel.
-
Slack API Rate Limit & Backoff Strategy Prompt
Design a resilient Slack API client that respects per-method rate-limit tiers, honors Retry-After, batches and coalesces calls, and never gets the app throttled into a death spiral.
-
Slack Slash Command Framework Design Prompt
Design a maintainable, multi-command slash command framework for a Slack app — routing, sub-command parsing, the 3-second ack rule, deferred responses, and per-command authorization.
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.