Opsgenie shuts down April 2027 - migrate to Pagerly in one click
PagerlyPagerly
← All postsEngineering

Automate PagerDuty Workflows in Slack

Build PagerDuty Slack workflows that assign, acknowledge and escalate automatically, and learn which automations make incidents worse.

Pagerly guide to automating PagerDuty workflows in Slack

Most teams wire up PagerDuty Slack workflows in the shallowest possible way: an incident fires, a message appears in a channel, and a human reads it and then goes somewhere else to do the actual work. That is a notification, not a workflow, and it leaves most of the value on the table.

The useful version automates the steps between the alert arriving and someone competent looking at it. Who gets assigned. Where the conversation happens. Who else needs pulling in. What the channel tells a newcomer at a glance. This guide covers how to build that, what to automate first, and the places where automation actively makes incidents worse.

Why most PagerDuty Slack workflows stop at notification

Watch what happens in a typical incident channel. The alert posts. Someone asks "is anyone looking at this?" Nobody answers for four minutes. Someone else asks who is on call. A third person guesses a name. The person actually on call is in a meeting and has not seen the mention.

None of that is an alerting failure. The alert worked perfectly. What failed is everything immediately after: assignment, acknowledgement, and shared awareness of who owns the problem. That gap is where minutes disappear, and it is entirely automatable.

The four things worth automating first

  • Assignment on arrival. An incident should land with a name attached, not an open question.
  • Ambient on-call visibility. Anyone glancing at the channel should be able to see who is on call without asking.
  • Acknowledgement in place. Responders should be able to ack without leaving the conversation.
  • Escalation as a deliberate action. Pulling in the next person should be one obvious step, not a scramble through a schedule.

Get those four right and most incident coordination overhead disappears. Everything beyond them is refinement.

Auto-assignment: the highest value automation

The single biggest improvement available is making sure every incident arrives already assigned to a specific person who is actually working right now.

Why unassigned work stalls

Diffusion of responsibility is real and well documented. An alert addressed to a channel of twelve people gets acted on more slowly than the same alert addressed to one named person, because everyone reasonably assumes someone else has it. Naming an owner at creation removes the ambiguity entirely.

The name has to come from the live rotation rather than a static group. A hardcoded list of three engineers is wrong the moment someone takes leave, and it is wrong silently, which is the worst way to be wrong.

Round robin versus load aware assignment

Strict round robin distributes evenly and is easy to reason about, which makes it a good default for ticket queues. Its weakness is that it ignores current load: the engineer already handling two incidents gets the third.

Load aware assignment checks how much is already open against someone before assigning more. It is better under pressure, which is exactly when it matters, at the cost of being harder to predict. A reasonable rule: round robin for support and ticket queues, load aware for incident assignment during busy periods.

Respect working hours and timezones

Assignment logic that ignores timezones produces tickets sitting unread for nine hours. If your team spans regions, assignment should prefer whoever is actually awake and working, with escalation to the genuinely on-call person for anything urgent enough to justify waking someone. The distinction between "needs attention today" and "needs attention now" should be encoded in the routing, not left to the sender's judgement.

Keeping on-call context visible in the channel

The question "who is on call right now" gets asked constantly, and every instance is a small tax on someone's attention. It is also completely unnecessary, because the answer is known and can simply be displayed.

Channel topic as a live status line

Keeping the current on-call name in the channel topic is a small change with a disproportionate effect. It is always visible, it needs no command, and it works for people who just joined the channel. When the rotation changes, the topic changes. Nobody has to look anything up.

Make the mention resolve to a person

An @oncall style mention that resolves to whoever is currently on rotation is the other half of this. It means a person from another team can escalate correctly without knowing your rotation, your schedule names, or who took over from whom last Tuesday. They mention the role, the right human gets notified.

This is worth more than it looks for cross team requests, which are the ones most likely to go to the wrong person and sit unanswered.

Handoff summaries at shift change

A short automated post at each rotation change, naming who is taking over and what is still open, costs nothing and prevents the classic failure where an incident quietly loses its owner at 9am. The outgoing person stops watching, the incoming person never knew, and the incident sits.

Escalation without leaving the conversation

Escalation should be one obvious action, available where the discussion already is. The moment escalating requires opening another tool, finding the right schedule and working out who is second on the rotation, people hesitate. Hesitation during an incident is expensive.

Make the next step explicit

The responder should be able to pull in the next person in the escalation path without knowing who that is. They should also be able to pull in a specific team by name, again without knowing that team's rotation. Both actions should be available from the channel.

Design for the person who does not know your system

Your escalation flow will eventually be used by someone who has never used it before, under pressure, at an unreasonable hour. Possibly a new joiner, possibly someone from an adjacent team. If it requires knowledge that lives only in the heads of the three people who built it, it will fail exactly when it matters. Test it by asking someone unfamiliar to escalate a test incident, and watch where they hesitate.

Where automation makes things worse

This is the section most guides skip, and it matters more than the automation itself.

Automatic channel creation for everything

Spinning up a dedicated channel per incident is genuinely useful for major incidents and actively harmful for minor ones. A channel per disk space warning gives you hundreds of dead channels, and it fragments the conversation so nobody can find the discussion afterwards. Gate channel creation on severity, and keep low severity incidents in the team channel where people already are.

Bots that narrate every state change

A message for every acknowledgement, note, priority change and field update turns the incident channel into a log file that humans stop reading. When responders start ignoring the bot, they also start missing the messages that mattered. Post the events that change what someone should do, and leave the rest in the timeline where it can be reviewed later.

Escalating on silence alone

Auto-escalation triggered purely by a lack of Slack activity punishes the responder who is heads down actually fixing the problem. If you escalate on inactivity, key it to incident state rather than message volume. Someone who acknowledged and is working needs a longer fuse than an incident nobody has touched.

Automating around a broken escalation policy

If your escalation policy is wrong, automation makes it wrong faster and more reliably. Fix the policy first. Automation is a multiplier, and it multiplies whatever sign the underlying process already has.

Keeping state in sync between Slack and your paging tool

The failure mode nobody anticipates is drift. Someone acknowledges in the mobile app, the Slack message still shows the incident as unacknowledged, and a second responder starts working the same problem. Or an incident is resolved in Slack, the paging tool never hears about it, and the escalation fires forty minutes later to a very confused engineer.

Pick one source of truth

Incident state should live in exactly one system, and everything else should reflect it. In practice that means the paging tool owns state, and Slack is a rich interface onto it. Actions taken in Slack should write through to the source of truth rather than updating a local copy. If your integration maintains its own separate notion of whether an incident is acknowledged, you will eventually get a divergence that nobody notices until it matters.

Update the original message, do not post a new one

When an incident is acknowledged or resolved, edit the existing message in place rather than posting a follow up. A channel where the first message still says UNACKNOWLEDGED and message fourteen says resolved is one that people will misread under pressure, and they will misread it in the direction of assuming nobody is handling it.

Handle the disconnection case explicitly

Integrations fail. Tokens expire, rate limits bite, services have bad days. The dangerous version is failing silently, because a Slack workflow that has quietly stopped working looks exactly like a period with no incidents. Both are a quiet channel. Make the integration surface its own failures somewhere a human will see them, and check periodically that alerts are still flowing rather than assuming silence means health.

Measuring whether any of this worked

Automation is easy to justify by how it feels and harder to justify with evidence. A handful of numbers tell you whether these workflows earned their keep, and they are worth capturing before you start so you have a baseline.

  • Time to acknowledge. The most direct measure of whether assignment and in place acknowledgement are working. This should drop noticeably within a couple of weeks.
  • Time to first human action. Different from acknowledgement and often more honest, since acking is cheap and does not prove anyone looked.
  • Reassignment rate. How often an incident moves after its initial assignment. A high rate means your routing rules do not match how the team actually divides work.
  • Escalation rate. Rising escalations can mean the first responder is under resourced, or that your rotation is putting the wrong people first.
  • Out of hours pages per person. Worth tracking on its own. Automation that speeds up response while quietly concentrating night work on two people is not a win.

Look at distribution rather than averages. A mean time to acknowledge of four minutes can hide a tail of incidents that sat for an hour, and that tail is where the real problems live. The median plus the 95th percentile tells you considerably more than the average does.

One caution: these numbers are easy to game without meaning to. If you make acknowledgement a single button, people will ack faster without necessarily looking faster. That is fine as long as you know it, which is why time to first substantive action is worth tracking alongside it.

A sensible rollout order

Teams that try to build all of this at once usually ship something nobody trusts. Sequence it instead, and let each step earn the next.

  • Start with visibility. Get the current on-call name into the channel topic and make the role mention resolve to a real person. Low risk, immediately useful, and it builds confidence that the schedule data is correct.
  • Add assignment. Once you trust the schedule data, start assigning incidents to the on-call person automatically. Watch for a week before adding anything else.
  • Add acknowledgement in place. Let responders ack from the channel. This is where the time savings become obvious to everyone.
  • Add escalation actions. One button to pull in the next person, one to pull in another team.
  • Add handoff summaries. Cheap, and it closes the shift change gap.
  • Only then consider per incident channels, gated on severity, once you know which incidents actually warrant one.

At every step, ask whether the automation removes a decision a human should not have to make, or whether it removes a decision a human should be making. The first is good automation. The second produces systems people quietly work around.

What this needs from your credentials

Worth being precise, because this is where teams over-scope. Every read described above (current on-call, schedule lookups, rotation membership, resolving a role mention to a person) is a GET operation. A read-only API key covers all of it. You only need write access if you are creating or modifying incidents from Slack, and even then a narrowly scoped credential is sufficient.

If you are setting this up, our guide to retrieving a PagerDuty API key covers generating the key and connecting it, and our PagerDuty sync and workflows documentation covers wiring the workflow side.

Key takeaways

  • Posting alerts to a channel is notification. Workflow is what happens between the alert arriving and the right person acting.
  • Auto-assignment from the live rotation is the highest value automation available. Unassigned work stalls predictably.
  • Round robin suits ticket queues. Load aware assignment suits incidents under pressure.
  • Put the on-call name in the channel topic and make role mentions resolve to a real person. Both remove a recurring tax on attention.
  • Escalation must work for someone who has never done it before, at 3am, without tribal knowledge.
  • Do not create a channel per incident below your major severity threshold, and do not narrate every state change.
  • Do not escalate on Slack silence alone. Key it to incident state, not message volume.
  • Roll out in order: visibility, assignment, acknowledgement, escalation, handoffs. Earn each step.
  • A read-only API key covers the entire read side of this.
  • Let the paging tool own incident state and treat Slack as an interface onto it, so the two cannot drift apart.
  • Baseline your time to acknowledge before you start, and read the 95th percentile rather than the average.

The goal is not maximum automation. It is that nobody has to ask who is on call, nobody has to guess whether an incident is owned, and escalating is easier than hesitating. Most teams can get there with four or five workflows, and the restraint about what not to automate matters as much as the automation itself.