# Incident response automation: how to automate it safely, step by step

> Published 2026-12-01
> Source: https://viktor.com/blog/incident-response-automation

To automate incident response, turn each runbook into a playbook with a trigger, conditions and actions. Then automate in this order: alert intake and deduplication, ticket creation and enrichment, paging and escalation, channel notifications, and drafted status updates. Viktor can handle the ticket, channel and update steps. Add containment, such as isolating a device, only when the action can be undone and a named approver sits in front of it. Measure MTTA and MTTR before and after each change.

Pick the tool by the job. For coordination across tools in the channel where the incident is discussed, start with Viktor, an [AI employee](https://viktor.com/ai-employee) your whole company shares. For security playbooks across SIEM, EDR and identity tools, use a SOAR platform. For alert grouping and paging, use your monitoring and on-call tools.

This guide covers both kinds of incident: a service outage and a security alert such as a reported phishing email. Every example below is fictional. It shows the shape of the workflow, not a deployment we tested.

## SOAR vs SIEM vs EDR: which tools automate incident response

For security incidents, three tool categories carry the response:

- **SIEM** (security information and event management) collects and analyzes security data from across your systems to detect threats.
- **SOAR** (security orchestration, automation, and response) connects security tools, automates repetitive tasks and runs structured response workflows.
- **EDR** (endpoint detection and response) works on devices: it detects, investigates and contains threats on laptops and servers.

In short: the SIEM finds the problem, the SOAR runs the response steps across tools, and the EDR acts on the device. Microsoft’s [Sentinel automation page](https://learn.microsoft.com/en-us/azure/sentinel/automation/automation) says Sentinel, “in addition to being a SIEM system, is also a platform for security orchestration, automation, and response (SOAR)”, so one product can cover two categories.

Outages use a different stack. A monitoring tool raises the alert, an alert router groups it, an on-call tool pages a person, and a ticket system keeps the record. Prometheus’s [Alertmanager](https://prometheus.io/docs/alerting/latest/alertmanager/) says it handles [“deduplicating, grouping, and routing”](https://prometheus.io/docs/alerting/latest/alertmanager/) alerts to receivers such as email or PagerDuty.

## Choose an automation approach: a decision matrix

Viktor’s row comes first because coordination is the work he takes on; the other rows are systems he works alongside, in no particular order, and you can combine them. The matrix compares what each approach is for, who keeps it running and how flexible it is. It gives no prices: check each vendor’s current terms for your team size.

```json:object
{
  "_key": "k46",
  "_type": "table",
  "rows": [
    {
      "_key": "k40",
      "_type": "tableRow",
      "cells": [
        "Approach",
        "Best for",
        "Who builds and maintains it",
        "Flexibility",
        "Team size it suits"
      ]
    },
    {
      "_key": "k41",
      "_type": "tableRow",
      "cells": [
        "Viktor, an AI employee",
        "Coordination across tools: timeline, tickets, channel updates, drafted status updates, post-incident evidence",
        "You describe the work in Slack, Microsoft Teams or the web app; Viktor sets up and test-fires the trigger",
        "High: plain-language instructions, any connected tool he is allowed to use",
        "Teams without a dedicated automation engineer, up to company-wide use"
      ]
    },
    {
      "_key": "k42",
      "_type": "tableRow",
      "cells": [
        "SOAR platform",
        "Security playbooks across SIEM, EDR, identity and email tools",
        "Security engineers build and test playbooks",
        "Broad across the security tools the platform connects",
        "A security operations team"
      ]
    },
    {
      "_key": "k43",
      "_type": "tableRow",
      "cells": [
        "Native EDR/XDR automation",
        "Device containment and remediation",
        "Security admins set automation levels",
        "Acts on the devices the EDR manages",
        "Any team that runs that EDR"
      ]
    },
    {
      "_key": "k44",
      "_type": "tableRow",
      "cells": [
        "Alert routing and on-call rules",
        "Grouping, routing, paging and escalation",
        "SREs or on-call owners edit the rules",
        "Rule-based and predictable",
        "Engineering teams with an on-call rotation"
      ]
    },
    {
      "_key": "k45",
      "_type": "tableRow",
      "cells": [
        "Custom scripts",
        "One narrow step your tools do not cover",
        "The developer who wrote them",
        "Unlimited, at the cost of upkeep",
        "Teams with spare engineering time"
      ]
    }
  ]
}
```

Why Viktor is first for coordination: an incident lives in a chat channel, and that is where he works. His [event triggers](https://viktor.com/docs/event-triggers) start work when “a webhook arrives, or a message is posted in a channel”, and he can create an inbound webhook URL for a service that sends webhooks. His docs say he test-fires a new automation before reporting the automation as live, and by default the test “captures chat messages instead of sending them and blocks writes to your integrations” (docs read 1 December 2026). Each connected tool is set to Run automatically, Ask for confirmation or Off on the [integration permissions](https://viktor.com/docs/integration-permissions) page. A SOAR platform remains the right home for security playbooks that run inside the security stack. Microsoft’s [Sentinel automation page](https://learn.microsoft.com/en-us/azure/sentinel/automation/automation) describes automation rules and playbooks built for a security operations center.

When the alternative is hiring another on-call coordinator or leaving the work with the incident commander, Viktor takes on the coordination work so the people on call keep the fix and the decisions.

## Map the incident lifecycle and name the incident commander

NIST’s [SP 800-61 Rev. 3](https://csrc.nist.gov/pubs/sp/800/61/r3/final), published April 2025, ties incident response to the Cybersecurity Framework 2.0. Atlassian’s [incident response guide](https://www.atlassian.com/incident-management/incident-response) describes six phases: “preparation, identification, containment, eradication, recovery, and lessons learned.” It also names the incident commander as the person who “oversees the entire incident response process and coordinates the team’s efforts.” Google’s [SRE book](https://sre.google/sre-book/managing-incidents/) says the incident commander “holds the high-level state about the incident.”

For automation, map each stage to what a machine may do:

```json:object
{
  "_key": "k84",
  "_type": "table",
  "rows": [
    {
      "_key": "k75",
      "_type": "tableRow",
      "cells": [
        "Stage",
        "What happens",
        "Automate?"
      ]
    },
    {
      "_key": "k76",
      "_type": "tableRow",
      "cells": [
        "Alert received",
        "A monitoring tool or SIEM reports a problem",
        "Yes: intake and dedupe"
      ]
    },
    {
      "_key": "k77",
      "_type": "tableRow",
      "cells": [
        "Incident opened",
        "A record is created with context",
        "Yes: create and enrich"
      ]
    },
    {
      "_key": "k78",
      "_type": "tableRow",
      "cells": [
        "Responder engaged",
        "On-call person acknowledges",
        "Yes: page and escalate"
      ]
    },
    {
      "_key": "k79",
      "_type": "tableRow",
      "cells": [
        "Severity set",
        "The impact is judged",
        "Suggest only; a person decides"
      ]
    },
    {
      "_key": "k80",
      "_type": "tableRow",
      "cells": [
        "Containment",
        "Stop the spread, such as isolating a device",
        "Only reversible actions, behind an approver"
      ]
    },
    {
      "_key": "k81",
      "_type": "tableRow",
      "cells": [
        "Investigation and fix",
        "People diagnose and change systems",
        "Human-led; automation collects evidence"
      ]
    },
    {
      "_key": "k82",
      "_type": "tableRow",
      "cells": [
        "Communication",
        "Internal and customer updates",
        "Draft yes; external sends after approval"
      ]
    },
    {
      "_key": "k83",
      "_type": "tableRow",
      "cells": [
        "Resolution and review",
        "Closed and reviewed",
        "Collect evidence yes; close by a person"
      ]
    }
  ]
}
```

The first line of any runbook should name the incident commander. Automation can page them, brief them and keep their timeline. It should not act as them.

## Playbooks and runbooks are the unit of automation

A runbook is the written procedure a person follows. A playbook is that procedure in a form a tool can run. Atlassian’s [Jira Automation guide](https://www.atlassian.com/software/jira/guides/automation/overview) puts it in three parts: “trigger, condition, and action”, with an audit log of each run.

Automate one runbook at a time. Start with a runbook your team already follows the same way each time; a procedure that changes with every incident is not ready for a machine.

## Build your first automated playbook: a phishing report, step by step

Microsoft’s [phishing investigation playbook](https://learn.microsoft.com/en-us/security/operations/incident-response-playbook-phishing) (read 1 December 2026) lists five stages: identify and confirm the message, scope the affected users, assess interaction and credential exposure, identify downstream activity, then contain the threat and prevent recurrence. Here is how to turn the first stages into an automated playbook.

1. **Choose the trigger.** A user reports a suspicious email, or your email security tool raises an alert. One trigger per playbook.
2. **Write the conditions.** Run only for reports from your own domain, and skip messages already handled in the last day.
3. **Automate the safe steps.** Look up the message ID, list all recipients, check sender and link reputation, and open one incident ticket.
4. **Gate the risky steps.** Removing the message from every mailbox or resetting an account goes to a named approver.
5. **Notify.** Post the ticket and the findings in the incident channel and page the on-call analyst if the verdict is malicious.
6. **Test with a harmless sample** in a test mailbox and test ticket project.
7. **Deploy, then review the first ten runs** by hand before you widen the trigger. Ten is a fair start; pick your own number.

The logic, as pseudo-code. It is a sketch we have not run, and the function names are placeholders, not a real API:

```
TRIGGER  email_reported OR email_alert(severity >= medium)
IF sender_domain IN own_domains AND NOT handled_in_last(24h, message_id):
    recipients  = message_trace(message_id)          # read-only
    verdict     = check_reputation(sender, links)    # read-only
    ticket      = create_ticket(title="Reported phishing", recipients, verdict)
    post_channel("#sec-incidents", ticket.link, verdict)
    IF verdict == malicious:
        page(on_call="security-primary")
        request_approval(action="remove_message_from_mailboxes",
                         approver="incident_commander")
        request_approval(action="reset_password", users=clicked_users,
                         approver="identity_admin")
LOG every step to ticket.timeline
```

The same pattern covers malware and ransomware alerts: read-only enrichment runs on its own, and containment goes through the approval gates in the next section.

## Design containment for false positives: blast radius and rollback

Automated containment on a false positive can cause the outage you were trying to prevent. Before automating an action, answer three questions: can it be undone, how many people does it affect, and who approves it?

```json:object
{
  "_key": "k141",
  "_type": "table",
  "rows": [
    {
      "_key": "k133",
      "_type": "tableRow",
      "cells": [
        "Action",
        "Reversible?",
        "Blast radius",
        "Suggested gate"
      ]
    },
    {
      "_key": "k134",
      "_type": "tableRow",
      "cells": [
        "Add context to a ticket, post to the incident channel",
        "Yes",
        "None outside the team",
        "Run automatically"
      ]
    },
    {
      "_key": "k135",
      "_type": "tableRow",
      "cells": [
        "Page the on-call person",
        "Yes",
        "One person",
        "Run automatically"
      ]
    },
    {
      "_key": "k136",
      "_type": "tableRow",
      "cells": [
        "Isolate one device",
        "Yes: Microsoft documents Release from isolation",
        "One device and its user",
        "Approver, or the vendor’s semi-automation level"
      ]
    },
    {
      "_key": "k137",
      "_type": "tableRow",
      "cells": [
        "Disable one user account",
        "Yes: re-enable",
        "One person",
        "Identity admin approves"
      ]
    },
    {
      "_key": "k138",
      "_type": "tableRow",
      "cells": [
        "Remove a message from all mailboxes",
        "Depends on your email tool’s recovery options",
        "Every recipient",
        "Incident commander approves"
      ]
    },
    {
      "_key": "k139",
      "_type": "tableRow",
      "cells": [
        "Block a domain or IP range company-wide",
        "Yes, but affects everyone",
        "Whole company",
        "Incident commander plus service owner"
      ]
    },
    {
      "_key": "k140",
      "_type": "tableRow",
      "cells": [
        "Restart, roll back or change production",
        "Sometimes",
        "Customers",
        "People only, not automated in a first playbook"
      ]
    }
  ]
}
```

Use the vendor’s own controls where they exist. Microsoft Defender for Endpoint, per its [automation levels page](https://learn.microsoft.com/en-us/defender-endpoint/automation-levels) read 1 December 2026, offers semi-automation levels where “approval is required for remediation actions” and pending actions wait in the Action Center. Its [Action center page](https://learn.microsoft.com/en-us/defender-xdr/m365d-action-center) lists “Isolate device (this action can be undone)”. The [device response page](https://learn.microsoft.com/en-us/defender-endpoint/respond-machine-alerts) says that after isolation “the button on the device page changes to say Release from isolation.”

To undo a false-positive isolation: release the device, record why the alert was wrong in the ticket, tune the condition that let it through, and add the case to your test set. Keep a written list of which actions are reversible next to the playbook.

## Wire notifications into Slack, paging and ticketing

Here is one routing setup for outage alerts from Prometheus, written from the configuration docs and not run by us; check it against your Alertmanager version before use. Alertmanager groups alerts and sends each group to receivers. Its [configuration docs](https://prometheus.io/docs/alerting/latest/configuration/) list `pagerduty_configs`, `slack_configs`, `jira_configs` and `webhook_configs` among receiver types.

```
route:
  receiver: checkout-oncall
  group_by: [service, alertname]
  group_wait: 30s
  group_interval: 5m
  repeat_interval: 4h

receivers:
  - name: checkout-oncall
    pagerduty_configs:
      - routing_key: <your PagerDuty Events API v2 key>
    slack_configs:
      - api_url: <your Slack incoming webhook URL>
        channel: "#inc-checkout"
    webhook_configs:
      - url: <inbound URL your incident workflow gives you>
```

`group_by` is your grouping rule: alerts with the same service and alert name are sent together in one notification, and Alertmanager deduplicates repeats of the same alert. The PagerDuty receiver pages the on-call person. PagerDuty’s [escalation policy docs](https://support.pagerduty.com/main/docs/escalation-policies) say that if no one acts before the escalation timeout, “the incident escalates to the next rule.” Its [Slack integration](https://support.pagerduty.com/main/docs/slack-integration-guide) lets responders “declare, acknowledge, escalate and resolve PagerDuty incidents” from Slack.

For the ticket, use a receiver that creates the issue, or Jira Automation’s [incoming webhook trigger](https://support.atlassian.com/cloud-automation/docs/jira-automation-triggers/), which runs a flow “when a HTTP POST is sent to a specified webhook URL.” For ServiceNow, check its own docs for the inbound integration your instance supports. The `webhook_configs` line can point at the inbound URL Viktor gives you, so he can keep the timeline in the channel.

## Walk through an outage, start to finish

At 14:02 a synthetic health check reports that the checkout page of an online store is returning errors. Over the next three minutes, two more monitors fire about the same service.

1. **Receive** all three alerts.
2. **Deduplicate** them into one incident: same service, matching symptom, inside the agreed time window.
3. **Create** an incident ticket titled “Checkout errors” with the first alert time and links to each alert.
4. **Enrich** the ticket with the service owner, the current on-call engineer, the runbook link and any deploys recorded in the last hour.
5. **Page** the on-call engineer and post the ticket link in the incident channel.
6. **Escalate** to the secondary on-call person if nobody acknowledges within the agreed window.

At 14:09 the engineer acknowledges and becomes incident commander. From then on the workflow supports them rather than acting on its own.

Enrichment adds only facts that can be looked up: owner, on-call schedule, runbook link, recent changes. “Deploy at 13:55 to checkout service” is a fact. “Caused by the 13:55 deploy” is a hypothesis for a person to test.

Severity drives everything after it. A workflow can suggest a severity from explicit criteria, such as whether the affected service is customer-facing. The incident commander confirms or changes it.

## Draft updates and ask before sending them

Every 30 minutes, or when the commander asks, the workflow drafts a short update from the timeline: what is affected, what is known, what is being done and when the next update will come. Thirty minutes is a sample cadence; set your own. The commander edits and approves it. Only then is it posted to the status page or sent to customers.

Internal updates to the incident channel can carry a lower bar. External ones need a named approver, because a wrong statement to customers is hard to take back.

## Measure MTTA and MTTR before and after automation

Atlassian’s [incident metrics guide](https://www.atlassian.com/incident-management/kpis/common-metrics), read 1 December 2026, defines both:

- **MTTA** (mean time to acknowledge): “the average time it takes from when an alert is triggered to when work begins on the issue.” To calculate it, “add up the time between alert and acknowledgement, then divide by the number of incidents.”
- **MTTR** (mean time to resolve): “the average time it takes to fully resolve a failure.” Add up the full resolution time in the period and divide by the number of incidents.

To check whether automation helped:

1. Fix the definitions first: which timestamp counts as the alert, the acknowledgement and the resolution.
2. Record a baseline over a set period before the change, from your on-call and ticket data.
3. Change one playbook at a time, then measure the same period length again.
4. Track three more numbers next to MTTA and MTTR: time to triage, the false-positive rate of automated actions, and the share of incidents where the playbook ran.
5. Compare incident counts as well as averages. A few long incidents can move an average more than the automation did.

We have no before-and-after figures from a real rollout to share, so use your own baseline rather than a benchmark.

## Keep production changes and incident closure under human control

For a first workflow, do not let automation restart services, roll back deploys or scale infrastructure. Those actions change production, and a wrong change during an incident can make it worse.

Keep these with people:

- any change to production systems
- the final severity decision
- external communication
- declaring the incident resolved
- assigning follow-up actions to named people

Closing an incident is a judgment that service is restored, not that alerts have stopped. Alerts can go quiet because monitoring itself failed.

## Test the workflow and improve it after each incident

Test with synthetic alerts in a test channel and a test ticket project, never by causing an outage. Check that:

- duplicate alerts merge into one ticket
- unrelated alerts stay separate
- the right person is paged
- escalation fires when nobody acknowledges
- drafted updates wait for approval
- containment requests reach the named approver and can be undone
- failures of the workflow itself are visible to a person

After a real incident, the timeline becomes the starting point for the review. People write the analysis and agree the follow-ups. Feed each false positive and each missed step back into the playbook’s conditions and tests.

The risks to watch: false positives that trigger containment, over-reliance on automation when a case does not fit the runbook, and integration breakage when a connected tool changes. Review your playbooks on a schedule you set, and after every incident they touched.

## Where Viktor fits

Coordination work spans several tools: monitoring, the ticket system, the chat channel and a status page. Viktor works in Slack and Microsoft Teams, in the channel where the work is already discussed. His [capabilities page](https://viktor.com/help/category/getting-started/what-viktor-can-do) describes event triggers from “a message in a channel, a webhook from another tool, or an event in a connected app.”

In the outage above, a team could ask Viktor to:

```
When an alert arrives on the checkout webhook, open a Jira incident ticket, post it in #inc-checkout, and keep a timeline of alerts, acknowledgements and decisions in that thread. Every 30 minutes, prepare a status update for the incident commander to approve.
```

He sets up the trigger and test-fires the automation before telling you the automation is live. Set the ticket and status-page tools to Ask for confirmation if you want a person to approve each change: a tool set that way runs only after someone approves it. After the incident, ask him for the post-incident evidence pack: alert times, acknowledgements, updates and ticket links in one document.

The commander stays in charge. Viktor does not replace your monitoring, SIEM, EDR or on-call platform, and what he can do depends on the integrations you connect and their permissions.

[Ask Viktor to keep your next incident timeline (up to $100 in free credits) →](https://app.viktor.com/signup) while your engineers focus on the fix. If the idea is new, start with [what an AI employee is](https://viktor.com/blog/what-is-an-ai-employee). For broader tooling, see our [IT automation tools guide](https://viktor.com/blog/it-automation-tools).

## A starting checklist

- Name the incident commander role and how someone takes it.
- Pick one runbook and write its trigger, conditions and actions.
- Define grouping rules for alerts (`group_by` in Alertmanager).
- Automate ticket creation and enrichment with facts only.
- Write the escalation path and timing.
- List every containment action with its rollback step and approver.
- Draft updates automatically; send only after approval.
- Record MTTA and MTTR before the change.
- Keep production changes and closure with people.
- Test with synthetic alerts, never a real outage.

[Hand Viktor your incident evidence pack (up to $100 in free credits) →](https://app.viktor.com/signup) so your team can serve customers reliably as the business grows.