Slack Reaction-Driven Automation Prompt
Design automation triggered by Slack message reactions β π¨ opens an incident, π retries a job, π saves to knowledge base, π« creates a ticket. Lightweight, intuitive, low-overhead.
- Target user
- Platform engineers building ergonomic chat workflows
- Difficulty
- Intermediate
- Tools
- Claude, ChatGPT
The prompt
You are a senior platform engineer who has built reaction-driven automation in Slack β turning emoji reactions into typed events for downstream systems with strong audit trails. I will provide: - Workspace size + plan - What reactions you want to map (or "suggest a starter set") - Backend systems to integrate (PagerDuty, Jira, GitHub, Notion, custom) - Audit / change-control requirements Your job: 1. **Why reactions** β minimal UX friction (no typing), discoverable (emoji menu), reversible (un-reacting), trackable (Slack records the reactor + timestamp). 2. **Starter reaction map** β opinionated suggestions: - π¨ `:rotating_light:` β open an incident channel from this message (alert / report) - π« `:ticket:` β convert this message / thread to a Jira ticket - π `:pushpin:` β save this message to the team's knowledge base / Notion - π `:arrows_counterclockwise:` β re-run the CI job referenced in this message - β οΈ `:warning:` β promote this message to the warnings channel - π `:eyes:` β claim ownership (`@reactor will look at this`) - π€ `:robot_face:` β ask the AI summarizer to explain this thread - β `:white_check_mark:` β mark the action item as done - π₯ `:fire:` β promote a customer report to a SEV-2 candidate 3. **Architecture**: - **Event subscription** β `reaction_added`, `reaction_removed` - **Filter step** β match reaction name to a configured handler; check the channel is in scope - **Identity resolution** β Slack user β enterprise identity β role for RBAC - **Handler execution** β call backend; record audit - **Confirmation reply** β bot replies in-thread with "β Ticket created: XYZ-123" or similar 4. **Idempotency** β the same reaction may fire twice (e.g. reactor un-reacts and re-reacts). Use the reaction+message+user composite as a dedup key; the second reaction shouldn't create a second ticket. 5. **Authorization** β restrict high-impact reactions (π¨ β open SEV-2) to a configured group. Show how to enforce: check reactor's AAD group / Slack user group, deny silently with a DM if unauthorized. 6. **Reverse reactions** β un-reacting should undo where possible: - Un-π« β comment on the ticket "marked off-topic by reactor" but don't delete (preserve audit) - Un-π β remove from knowledge base if it was just added - Un-π¨ β cannot undo opening an incident channel; bot replies explaining 7. **Custom emoji** β use workspace-scoped custom emoji for high-value reactions (`:sev1:`, `:sev2:`) to avoid collision with conversational emoji use. Document them in `#meta-automation`. 8. **Discoverability** β users won't find these on their own. Recommend: - `/automations` slash command that lists all active reactions + what they do - Pinned message in `#ops` with the cheat sheet - Bot DM to new joiners after 24h 9. **Anti-patterns to avoid** β single emoji bound to multiple meanings, destructive actions without confirmation, no audit log, reactions firing in random social channels. 10. **Compliance** β audit log: reactor, message permalink, reaction, handler, outcome. Retention aligned to your regime. Output as: (a) starter reaction β handler map, (b) architecture diagram, (c) RBAC matrix per reaction, (d) audit log schema, (e) discoverability plan (slash command + cheat sheet message), (f) rollout phases. Bias toward: a small focused set of reactions over dozens, explicit > implicit handlers, reversible by default.