> ## Documentation Index
> Fetch the complete documentation index at: https://docs.scaling.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# Create an automation rule

> Build a when → then automation rule that runs an action automatically on an incident lifecycle event.

This guide builds an [automation rule](/concepts/automation-rules) — declarative `when → then` automation that runs an action whenever an incident event matches your conditions. Automation rules are available on **every plan** and involve no AI and no approval step.

We'll build a common one: *when a `critical` incident opens, post to `#major-incidents`.*

## Prerequisites

* Permission to manage automation rules in your organization.
* The integration your action needs — for a post-to-channel action, a connected [Slack](/integrations/slack) workspace.

<Steps>
  <Step title="Open Automation Rules">
    In the dashboard, go to **Automation Rules** and click **New rule**.
  </Step>

  <Step title="Name the rule and pick the event">
    Give the rule a clear name (e.g. *"Announce critical incidents"*). Choose the **when** event:

    * `incident.created`
    * `incident.acknowledged`
    * `incident.resolved`

    For this example, choose `incident.created`.
  </Step>

  <Step title="Add conditions">
    Add an equality condition `severity = critical`. You can add more conditions — for example `component = payments` — and **all** of them must hold for the rule to fire. Leave conditions empty to act on every incident for the event.
  </Step>

  <Step title="Choose the action">
    Pick the **then** action and fill in its fields. The available actions are post to channel, create ticket, attach runbook, and call webhook — the same set as [proposed actions](/concepts/proposed-actions#action-types). For this example, choose **Post to channel** and set the message and target channel.
  </Step>

  <Step title="Enable and save">
    Make sure the rule is **enabled**, then save. It now fires on every matching incident. Toggle it off later to pause it without deleting it.
  </Step>
</Steps>

<Note>
  An action fired by a rule is attributed to the **rule's author**, not to
  whoever acknowledged or resolved the incident.
</Note>

## Manage rules over the API

Rules can also be managed over the `/v1` API — see [Automation rules → API](/concepts/automation-rules#api). Authenticate with an API key as described in [Authentication](/authentication).

## Rules vs. proposed actions

If you want the *AI* to suggest an action during an incident for a human to approve, that's a [proposed action](/concepts/proposed-actions), not an automation rule. Automation rules fire on events you choose, with no approval step.
