Slack Automation: From Workflow Builder to an Alert-Triage Agent

Slack Workflow Builder is capable now. This is what comes next: an agent that reads an alert, pulls context from Linear and GitHub, and posts a structured Slack message with action buttons for a human.

Jose Giron
Major and Slack lockup: an alert-triage agent built on the Slack Web API.

Slack automation is the practice of turning routine Slack activity into flows that run without someone clicking through them by hand: a message that posts on a schedule, a form that kicks off an approval, a new channel member who gets a welcome and a link to the runbook. Most of it runs through Slack Workflow Builder, and Workflow Builder is good at this. It is no-code, it starts from scheduled or action triggers, it supports conditional logic with up to 15 conditions, it ships a Generate AI response step anyone can drop into a flow, and it connects to Salesforce and 70-plus apps through plug-and-play connectors. If you want a new-hire onboarding flow or a PTO request that routes to a manager, build it in Workflow Builder and move on.

Key takeaways

  • Slack automation means running routine Slack activity as flows, most of which fit inside Workflow Builder, a capable no-code tool with triggers, conditional logic, and a built-in AI step.
  • Workflow Builder stops where the work needs cross-system context and a judgment call. It runs a fixed flow inside Slack and holds no real state between runs.
  • An agent on the Slack Web API fits when a decision needs context from other systems: reading an alert, pulling the related Linear issue and GitHub commits, and posting a Block Kit message with action buttons.
  • The human stays in the loop. A well-scoped triage agent recommends and routes on a button click. It never auto-resolves an incident.

What is Slack automation?

Slack automation is any setup that makes Slack do work on its own, from a scheduled reminder to a form that starts an approval. Most teams build it in Workflow Builder, which is no-code and good at fixed, in-Slack flows. Here is where it stops. A Workflow Builder workflow is a fixed flow that lives inside Slack. It runs the steps you laid out, in the order you laid them out, and its AI step is one canned action inside that sequence, not a process that reads several systems and decides what to do next. It holds no real state between runs beyond what you wire into a connected sheet, and it does not reason about whether this alert matters more than the last one. For a lot of team plumbing, that is fine. For work that has to read an alert, gather context from other systems, and make a judgment call, the fixed flow runs out of room.

  • Slack Workflow Builder Scope: No-code flows inside Slack. Cross-system reasoning: No, one canned AI step. Persistent state: Minimal, via connected sheets. Human in the loop: Buttons and forms you predefine.
  • Zapier / Make Scope: Cross-app trigger-action plumbing. Cross-system reasoning: No, rule-based mapping. Persistent state: Per-run and limited. Human in the loop: Approval steps you configure.
  • Slack agent on the Web API Scope: Reasoned triage across systems. Cross-system reasoning: Yes, reads context and decides. Persistent state: Yes, own database and audit log. Human in the loop: Block Kit action buttons by design.

When an AI agent over Slack actually helps

An agent over Slack helps when a decision needs context that lives outside Slack and judgment the flow cannot encode ahead of time. An agent, in the practical sense of what an AI agent is, earns its place when the decision needs context that lives outside Slack. Three patterns show up most in engineering and ops.

Alert and incident triage

A monitoring alert lands in a channel. Before anyone reads it, the agent decides likely severity and the likely owner. It pulls the recent history of that service, checks whether a similar alert fired last week, and posts a short, ranked summary instead of a raw stack trace. The triage is the value here: which of the forty alerts tonight is the one worth waking someone for.

Cross-system context-gathering

The moment an on-call engineer sees an alert, they start opening tabs: the Linear issue that tracks the flaky service, the GitHub commits that touched it in the last day, the previous incident thread. The agent does that gathering in the seconds before the human looks. It finds the related Linear issue, pulls the recent commits and open PRs against the failing area, and folds all of it into one Slack message. It is the same agentic workflow patterns that show up across triage-and-route work, applied to the on-call inbox.

Structured updates with action buttons

A wall of text in a channel is not a decision surface. Block Kit lets the agent post a structured message: a summary, the context it gathered, and Approve or Escalate buttons. The engineer reads three lines and clicks. That click is the point. The agent proposes, the human decides.

What you need to build one

You build a custom Slack automation on the Slack Web API, not Workflow Builder. What you need is a Slack app, a scoped bot token, and a place to receive events and button clicks.

The Slack API in about 200 words

You build a custom Slack automation on the Slack Web API, not Workflow Builder. Auth is a bot token from a Slack app, with OAuth scopes you request per capability: chat:write to post, channels:history and groups:history to read channel messages, plus reaction or file scopes if you need them. To post, you call chat.postMessage with text or a Block Kit blocks array. To read prior context in a thread or channel, you call conversations.history and conversations.replies. To react to events like an incoming alert or a slash command, you subscribe through the Events API, which delivers events to a request URL you host, or over Socket Mode for apps without a public endpoint. Interactive buttons post their payloads to an interactivity request URL, where your handler reads which button was clicked and by whom, then acts. Rate limits are tiered per method, per workspace, on a per-minute window, and chat.postMessage sits in a special tier that generally allows about one message per second per channel. Everything the agent does over this API is a discrete, loggable call, which is what makes the work auditable after the fact.

Pros and cons of the Slack API

The Web API is well-documented and stable, Block Kit gives you real interactive surfaces without building a frontend, and the Events API means the agent reacts to what happens rather than polling for it. Those are the reasons to build on it.

The honest gotchas. Rate limits are tiered and enforced per method per workspace, so a triage agent that fans chat.postMessage across many channels has to respect the roughly one-message-per-second-per-channel ceiling or it gets throttled. You choose between a public request URL and Socket Mode early, and switching later is real work. Scope management is its own discipline: request too much and security review stalls, request too little and a call fails at runtime with a missing-scope error. None of this is hard, but it is the part a demo skips.

A worked example: the alert-triage agent

What it does

A Sentry alert fires and posts to #incidents through an incoming webhook. The agent reads it, gathers context, assesses likely severity and owner, and posts one Block Kit message: a two-line summary, the related Linear issue, the three most recent commits touching the failing service, and two buttons, Approve owner and Escalate. On Approve, it assigns the issue to the suggested owner in Linear and logs the decision. On Escalate, it pages the secondary on-call and logs that instead.

Human stays in the loop: the agent posts a recommendation and routes on a button click. It never closes or resolves an incident on its own.

How the steps wire together

The flow runs in order:

  1. The alert arrives via the Events API, or a webhook from Sentry or PagerDuty.
  2. The agent calls the Linear API to find the issue tracking the failing service, and the GitHub API to pull recent commits and open PRs against that path.
  3. It scores severity from the alert payload plus what it found, and picks a likely owner from recent commit authorship.
  4. It calls chat.postMessage with a Block Kit blocks array to post the summary and buttons to #incidents.
  5. The button click hits the interactivity handler, which calls Linear to assign or PagerDuty to escalate, then records the outcome.

Slack, Linear, and GitHub are the named connectors here, not a generic stack.

A minimal Block Kit post from the agent looks like this:

// Post the triage summary with Approve / Escalate buttons
await slack.chat.postMessage({
channel: "#incidents",
text: "Triage: payments-api 500s (likely SEV-2)",
blocks: [
{ type: "section", text: { type: "mrkdwn",
text: "*payments-api* error rate spiked. Linear ENG-1421, owner a.rivera" } },
{ type: "actions", elements: [
{ type: "button", action_id: "approve_owner", style: "primary",
text: { type: "plain_text", text: "Approve owner" }, value: "ENG-1421" },
{ type: "button", action_id: "escalate", style: "danger",
text: { type: "plain_text", text: "Escalate" }, value: "ENG-1421" }
] }
]
});

What governance the agent needs

The bot token is scoped to the incident channels and nothing else. Every triage the agent runs, and every button a human clicks, is written to its own database with a timestamp, the context it saw, and the decision, so an incident review can replay exactly what happened. That replayable record is the core of AI agent observability, and it is the enterprise-grade governance an ungoverned script in someone's cron does not have. The agent respects Slack's tiered rate limits and, again, recommends and routes but never auto-resolves.

What this pattern does not cover

This is a triage-and-route pattern, not full incident automation. The agent does not resolve or close incidents, roll back deploys, or edit production. It does not replace your on-call rotation or your paging policy, and it is only as good as the scopes and connectors you give it. If Linear, GitHub, or your alert source is not wired in, the context it gathers is thinner. Treat it as a decision surface that a human still drives.

Build this in Major

The triage logic above has a stable part and a variable part. The variable part is each new alert: its payload, the current state of the code, who touched it last. That needs a model to read and judge. The stable part is everything else: how to find the related Linear issue, how to score severity, which channel to post to, what the Block Kit message looks like, who to escalate to. On most tools the stable part gets re-derived by the model on every alert, which is slow, spends tokens each run, and drifts a little in behavior each time.

Major is the enterprise platform where agents build the software they run on. The agent reasons through the triage flow once and builds it into a governed app: the routing rules, the message template, and the escalation path become deterministic code, and the app carries its own database, its scoped Slack token, and its audit log. From then on the model reads each new alert's context and makes the judgment call, while the app runs the parts that do not change. This is what engineering-ops automation looks like when it is built to be inspected. Reason once. Run forever.

If you run on-call through Slack, the alert-triage agent is a concrete first build: a governed app that reads each alert, gathers Linear and GitHub context, and posts a Block Kit message your team approves. It keeps its state and its audit trail in one place instead of scattered across a script and a channel's history. Get started on Major and build your Slack alert-triage agent.

Related articles

Frequently asked questions

What is Slack automation?
Slack automation turns routine Slack activity into flows that run on their own. Slack Workflow Builder handles the no-code, in-Slack version: scheduled or action triggers, conditional logic, and a built-in AI step. Agents built on the Slack Web API go further, reasoning across other systems and keeping state between runs.
What is a Slack workflow?
A Slack workflow is a trigger-plus-steps automation built in Workflow Builder. A trigger starts it, a scheduled time, a form submission, or an emoji reaction, and the steps that follow can branch with conditional logic (up to 15 conditions) and include a Generate AI response step. The whole flow runs inside Slack.
Slack Workflow Builder vs Zapier, which should I use?
Use Workflow Builder for no-code flows that live inside Slack, like onboarding or approvals. Use Zapier or Make for cross-app plumbing that moves data between many SaaS tools. Reach for an agent on the Slack Web API when the work needs reasoning across systems and memory of what it saw before.
How do you build a custom Slack automation?
You build it on the Slack Web API with a bot token and scoped OAuth permissions. Post with chat.postMessage, read context with conversations.history, receive events through the Events API, and add interactive buttons with Block Kit. A common first build is an alert-triage agent that gathers context and posts an approval message to a channel.
Can a Slack agent resolve incidents by itself?
It should not. A well-scoped triage agent recommends a severity and owner, gathers context, and posts Block Kit buttons so a human approves or escalates. Resolution stays human-approved. Keeping the agent to recommend-and-route, with every decision logged, is what makes it safe to run against production incidents.