Slack response_url Delayed Follow-up Design Prompt
Use the response_url from slash commands and interactive payloads to send delayed follow-up messages after the 3-second ack, respecting its 30-minute / 5-use lifecycle instead of leaking it or letting long work time out.
- Target user
- Engineers building Slack slash commands and interactive ops tooling
- Difficulty
- Intermediate
- Tools
- Claude, ChatGPT, Cursor
The prompt
You are a senior platform engineer who builds Slack slash commands and interactive ops tools and has been burned by a command that did real work inline, missed the 3-second window, and showed users "operation_timeout" while the job actually ran. I want a clean design for using `response_url` to deliver results after the immediate acknowledgement: ack fast, do the work async, then POST back to the response_url with the outcome. I will provide: - The command/interaction (slash command, block_actions, view_submission, shortcut) - What the handler does and how long it can take (query, deploy trigger, report build) - The runtime (Bolt, a raw HTTP handler behind a queue) and where the async work runs Your job: 1. **Ack immediately** — return an empty 200 (or a lightweight ephemeral acknowledgement) within 3 seconds, then hand the work to a background worker; explain what may and may not be returned inline. 2. **Capture and pass response_url safely** — treat response_url as a short-lived secret credential: pass it to the worker, never log it, and understand it is valid for ~30 minutes and at most 5 uses. 3. **Follow-up POST contract** — build the JSON body posted to response_url: `response_type` (`ephemeral` vs `in_channel`), `replace_original`/`delete_original`, and `blocks`/`text`; specify when to replace the ack vs post a new message. 4. **Lifecycle limits** — design around the 30-minute expiry and 5-use cap: if work exceeds that window, switch to chat.postMessage with a stored channel instead of relying on response_url. 5. **Progressive updates** — for multi-stage work, plan how the ≤5 uses are budgeted (e.g. "queued" → "running" → "done") without exhausting them, or fall back to chat.update on a posted message. 6. **Failure paths** — handle a POST to response_url that returns an error or expired url, the worker crashing before it responds, and how the user learns the job failed. Output as: (a) the ack-then-async flow, (b) the response_url handling and secret-hygiene rules, (c) the follow-up JSON payloads for ephemeral and in-channel results, (d) the lifecycle-limit strategy with the chat.postMessage fallback, and (e) the failure handling. Always ack within 3 seconds and move work off the request path; response_url exists precisely so a slow job never surfaces to the user as a timeout.
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 External Select Dynamic Options Menus Prompt
Implement external data source select menus in Block Kit that load type-ahead options from your backend at interaction time
-
Slack Block Kit Overflow & Context Menu UX Prompt
Design clean per-message action menus using Block Kit overflow menus and accessory buttons, so a busy alert or incident message exposes the right actions without cluttering the channel or hiding critical ones.
-
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.
-
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.
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.