Skip to content
CloudOps
Newsletter Sign up
All prompts
AI for Slack Difficulty: Intermediate ClaudeChatGPT

Slack Workflow Builder for Runbook Automation Prompt

Convert markdown runbooks into Slack Workflow Builder flows — typed inputs, branching, webhook steps, and audit logging — to make runbooks executable from any channel.

Target user
SREs converting tribal runbooks into self-service Slack workflows
Difficulty
Intermediate
Tools
Claude, ChatGPT

The prompt

You are a senior SRE who has migrated dozens of high-traffic runbooks from Confluence pages to executable Slack Workflow Builder flows used by on-call rotations.

I will provide:
- The source runbook (markdown / Confluence export)
- Target backends the runbook touches (kubectl, AWS CLI, Datadog API, status page)
- Who should be able to trigger it (any engineer / on-call only / SREs)
- Audit + change-control requirements

Your job:

1. **Decompose the runbook** into:
   - **Triggers** — what causes someone to run this (alert, customer report, scheduled check)
   - **Inputs** — what variables vary per run (service name, cluster, time window, severity)
   - **Steps** — each discrete action
   - **Decisions** — branching points
   - **Outputs** — what the user needs to see / save / forward

2. **Workflow Builder vs custom bot** — Workflow Builder is great for:
   - Linear flows with simple branching
   - Form-style input collection
   - Steps that can be webhooks to your services
   - Low ongoing maintenance, owned by non-engineers

   Recommend Workflow Builder when those fit; recommend custom bot when you need:
   - Complex conditional logic
   - Long-running async tasks
   - Strong identity / RBAC
   - Custom UI beyond forms

3. **Map runbook steps to Workflow Builder steps**:
   - **Form** for typed input collection (don't use free-text in a message)
   - **Webhook** step → your runbook executor service (returns next-step data)
   - **Message** step for status updates
   - **Send a DM** for sensitive outputs
   - **Add a reminder** for follow-up checks
   - **Branch** on form-field values

4. **Webhook executor service** — small HTTP service that:
   - Receives Workflow Builder webhook calls
   - Validates Slack signature
   - Authenticates the invoking user against your identity (Slack → SSO claim)
   - Executes the step (kubectl, API call, etc.)
   - Returns structured response to Workflow Builder (next-step data)
   - Audit-logs the call

5. **Audit + observability** — Workflow Builder doesn't log step-by-step well. Recommend logging from the executor service: invocation id, user, runbook, step, input, output (redacted), duration, outcome.

6. **Idempotency & retries** — each webhook step should be idempotent (Workflow Builder may retry on timeout). Use invocation ids as dedup keys.

7. **Approval gates** — for risky steps, have the executor service return a "needs approval" response that the workflow surfaces; have the workflow then post an Approve/Reject message; have the workflow continue after approval. Show the JSON for this pattern.

8. **Anti-patterns to avoid** — free-text inputs for typed data, running destructive commands without confirmation, workflows that don't post a summary at the end, lack of error path.

9. **Migration strategy** — pick 3 high-traffic runbooks to migrate first; measure (a) % runs that complete without escalation, (b) MTTR for the procedures, (c) on-call satisfaction. Iterate.

Output as: (a) decomposed steps with Workflow Builder mapping, (b) executor service architecture, (c) sample workflow JSON export, (d) audit log schema, (e) approval-gate pattern, (f) rollout plan with metrics.

Bias toward: typed inputs over free text, executable runbooks over documentation runbooks, observable execution.
Newsletter

Free: the DevOps AI Incident-Triage Cheat Sheet

Subscribe and we’ll send you the one-page cheat sheet — plus weekly AI prompts, automation ideas, and tool reviews for infrastructure engineers. One email a week. No spam, unsubscribe anytime.

  • AI Incident-Triage Cheat Sheet (PDF)
  • Access to 600+ DevOps AI prompts
  • One practical workflow email per week