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

# Automations

> Create scheduled, webhook and message-triggered tasks that CodeRabbit Agent runs automatically.

export const Hint = ({type, children, headline, tip, href, cta}) => {
  const TIPS = {
    learnings: {
      headline: "Learnings",
      tip: "Review preferences CodeRabbit learns from your chat conversations and applies automatically to future reviews.",
      cta: "Learn about Learnings",
      href: "/knowledge-base/learnings",
      content: "Learnings"
    },
    walkthrough: {
      headline: "PR Walkthrough",
      tip: "A structured comment posted by CodeRabbit at the top of every pull request, summarizing changes, sequence diagrams, review effort, and more.",
      cta: "Learn about PR Walkthroughs",
      href: "/pr-reviews/walkthroughs",
      content: "Walkthrough"
    },
    "finishing-touches": {
      headline: "Finishing Touches",
      tip: "Post-review agentic actions (Autofix, writing docstrings or unit tests, and more) you trigger from a PR comment or a checkbox in the Walkthrough.",
      cta: "See all Finishing Touches",
      href: "/finishing-touches",
      content: "Finishing Touches"
    },
    "coding-plan": {
      headline: "Coding Plan",
      tip: "A detailed, codebase-aware implementation plan CodeRabbit generates from an issue or description, ready to hand off to any coding agent.",
      cta: "Learn about Coding Plans",
      href: "/plan",
      content: "Coding Plan"
    },
    "knowledge-base": {
      headline: "Knowledge Base",
      tip: "The collected context sources CodeRabbit draws on during reviews: Learnings, Code Guidelines, issue trackers, connected MCP servers, and cross-repo analysis.",
      cta: "Explore the Knowledge Base",
      href: "/knowledge-base",
      content: "Knowledge Base"
    },
    "path-instructions": {
      headline: "Path Instructions",
      tip: "Custom review rules that only apply to files matching a glob pattern, e.g. 'src/controllers/**'.",
      cta: "Configure path instructions",
      href: "/configuration/path-instructions",
      content: "Path Instructions"
    },
    "change-stack": {
      headline: "Change Stack",
      tip: "An improved code inspection interface that reorganizes a pull request from a flat file list into a structured, layer-by-layer walkthrough with range-specific summaries and diagrams when useful.",
      cta: "Learn about Change Stack",
      href: "/pr-reviews/change-stack",
      content: "Change Stack"
    },
    scope: {
      headline: "Scope",
      tip: "A named set of repositories, connections, and spend limits that controls what CodeRabbit Agent can access in a given Slack conversation.",
      cta: "Learn about Scopes",
      href: "/slack-agent/scopes",
      content: "Scope"
    },
    "coderabbit-agent": {
      headline: "CodeRabbit Agent for Slack",
      tip: "An AI agent built into Slack that investigates issues, generates implementation plans, and opens pull requests right from the Slack threads.",
      cta: "Explore CodeRabbit Agent",
      href: "/slack-agent",
      content: "CodeRabbit Agent"
    },
    "configuration-inheritance": {
      headline: "Configuration Inheritance",
      tip: "A setting that merges configuration values across multiple levels — repository YAML, central YAML, and UI settings — instead of using only the highest-priority source.",
      cta: "Learn about Configuration Inheritance",
      href: "/configuration/configuration-inheritance",
      content: "Configuration Inheritance"
    }
  };
  const defaults = TIPS[type] || ({});
  return <Tooltip headline={headline ?? defaults.headline} tip={tip ?? defaults.tip} cta={cta ?? defaults.cta} href={href ?? defaults.href}>
      {children ?? defaults.content}
    </Tooltip>;
};

Automations let CodeRabbit Agent run recurring or event-driven tasks for you. They can run on a **recurring schedule**, react to top-level **channel messages**, or run from a saved trigger such as a **webhook event**. You can create and edit scheduled automations in the web app automation editor, or create them conversationally from Slack. The web app also includes a `Triggers` tab for creating and managing trigger-based automations.

Each automation runs under the <Hint type="scope">scope</Hint> that applies to the channel or DM where it lives, so it only accesses the repositories, connections, and spend limits that surface is allowed to use.

Automation runs always use the organization's configured authoring identity. They cannot use a personal, per-request "as me" identity.

## Examples

<Tabs borderBottom>
  <Tab title="Scheduled check">
    A platform team wants CodeRabbit Agent to check for new security advisories every morning. An engineer goes to `#platform-eng` and sends:

    ```
    @coderabbit Check for new dependency vulnerabilities in the main branch
    and summarize anything critical. Run this daily.
    ```

    CodeRabbit Agent runs it once as a trial. After reviewing the output, the engineer confirms the automation. From that point on, a fresh thread appears in `#platform-eng` every morning with the results.
  </Tab>

  <Tab title="Message triggered">
    A reliability team wants CodeRabbit Agent to investigate each new Datadog alert posted in `#prod-alerts`. An engineer asks CodeRabbit to save an automation that watches new channel messages from the Datadog bot, enters `datadog` as the bot name, checks whether each alert looks real, and replies with the next step.

    From that point on, every matching top-level alert message in `#prod-alerts` gets a thread reply from CodeRabbit Agent. The automation stays in that same channel and only runs when a new message matches the saved trigger.
  </Tab>

  <Tab title="Webhook triggered">
    An on-call team wants CodeRabbit Agent to triage every new PagerDuty incident automatically. An admin creates a webhook trigger with PagerDuty as the source, connects PagerDuty, and selects the incident event types to receive. The agent instructions tell CodeRabbit to look up the affected service, check recent deploys, and post a summary with a suggested next step.

    After saving, CodeRabbit automatically creates and maintains the account-wide PagerDuty webhook subscription. From that point on, every selected incident event fires the trigger and CodeRabbit Agent posts a triage summary to the configured Slack channel. See [Connections](/slack-agent/connections) for setup and permissions.
  </Tab>
</Tabs>

## Creating an automation

Create a scheduled automation in the web app automation editor, or ask `@coderabbit` to create one in any channel or DM. In Slack, CodeRabbit Agent walks you through the setup in a thread. When you create an automation conversationally, it runs once as a **trial** before activating it, so you can review the output and iterate on the prompt before it starts running on its own.

Edited automation prompts and new scheduled automations can be saved directly from the web app. You do not need to start a Slack or Discord conversation just to schedule an automation or update its prompt.

<Info>
  In channels, you can also use the `/automations` slash command as a shortcut. Slash commands are not available in Direct Messages or threads.
</Info>

Any linked workspace user can create automations. Broader management remains permission-based: workspace admins can manage every automation and trigger, Automation admins can manage same-workspace automations when Automation admin management is enabled, and other users can manage the automations they created.

## Schedules

Recurring schedules are configured in the automation editor. Depending on the frequency you choose, schedule controls include interval, time, timezone, weekdays, and day of month.

Recurring automations can run:

* Every `x` minutes (10 minutes minimum)
* Hourly
* Daily at a selected time
* Weekly on selected weekdays
* Monthly on a selected day of the month

All schedules are timezone-aware.

## Triggers

Triggers are rules that start CodeRabbit Agent when a matching event arrives.

When you create an automation, you can save it as a paused draft or save and enable it immediately. A paused automation keeps its configuration but does not process new events until you enable it. Existing triggers can be switched between active and paused before saving changes.

Each automation trigger has:

* **Source**: where the event comes from
* **Matching rules**: which events should run the trigger
* **Agent instructions**: what CodeRabbit Agent should do when the trigger runs, including invoking an existing [durable skill](/agent/skills) so recurring or triggered runs reuse an established procedure
* **Destination**: where CodeRabbit Agent posts the result

### Slack channel messages

Slack channel message triggers run when a new top-level bot or app message appears in a selected channel. Instead of waiting for a clock-based schedule, they fire when a matching message arrives.

Use them when you want CodeRabbit Agent to react to repeated operational events, such as new alerts, queue-health posts, or deployment notices.

Slack channel message triggers support:

* **All new top-level bot or app messages** in the channel
* A required **Bot name** field that identifies the Slack bot CodeRabbit should respond to, such as `datadog`
* **Text filters** using case-insensitive substring matching

CodeRabbit Agent always replies in the triggering thread. In the current version, these triggers must use **Same thread** delivery.

Human-authored messages never fire this trigger type. A Slack channel message trigger only runs when a new top-level message comes from a bot or app whose name matches the trigger's Bot name field. `Run now` is also unavailable for these triggers. To test one, post a matching message in the channel from that bot or app.

### Webhook events

Webhook triggers run when an external service sends a matching webhook event:

* Any service can be connected via a **custom webhook**
* **Natively supported providers** (with pre-configured event types and payload schemas): Datadog, Sentry, PagerDuty, Linear, Jira, Fin (formerly Intercom), Zendesk, and Pylon

Providers with managed webhook connections, such as PagerDuty, let CodeRabbit provision and synchronize the provider's webhook subscription automatically. Managed PagerDuty webhooks support both Slack and workspace automations. The subscription is account-wide rather than scoped to a single PagerDuty service or team, and a global admin must connect PagerDuty. See [Connections](/slack-agent/connections) for setup and permissions.

Linear also uses a managed webhook connection. After you connect a Linear authorization with the required access, CodeRabbit automatically provisions and maintains the Linear webhook subscription. In the automation editor, select an existing Linear authorization or choose **Connect another Linear workspace** to add one. CodeRabbit preserves the automation draft during the OAuth handoff and returns to the editor with the new authorization selected. Webhook administration requires Linear `read`, `write`, and `admin` access. These authorizations are used only to administer triggers and are not available as destination connections. See [Connections](/slack-agent/connections) for setup and permissions.

For custom webhooks and providers without a managed webhook connection, CodeRabbit shows the webhook URL, required header, and sample payload to configure in the source service after you save the trigger. Webhook events are processed only when the trigger is active.

Webhook triggers can match by provider event type, by JSON payload fields, or both. A rule configured with a base event type matches all actions for that event, while a rule configured with a specific action matches only that exact action. For example, `release` matches all release actions, but `release.published` matches only the published action and does not match sibling actions such as `release.created`. If no matching rule passes, the event is dropped.

## Delivery

Each automation uses one of two delivery modes:

* **Fresh thread**: starts a new thread for every run
* **Same thread**: posts into the same thread each time (required for Slack channel message triggers, and also available when a recurring automation was created from a thread with a concrete root message)

For an eligible public Slack channel destination, CodeRabbit attempts to join the channel before it validates the thread and posts the run. You do not need to invite the bot to the public channel manually. Disabled Slack targets and non-public destinations are excluded from this auto-join path.

<Warning>
  If the Slack workspace has not granted permission to join public channels, the run fails before it posts and reports a reauthorization-specific error. A workspace admin must reauthorize the Slack integration through [Connections](/slack-agent/connections) or the [Reconnect Slack flow in Scopes](/slack-agent/scopes) to grant the join permission. After reauthorization, automations use the auto-join behavior.
</Warning>

## Deduplication

Webhook-triggered automations deduplicate repeated deliveries when the complete payload is byte-for-byte identical. A repeated delivery can match a trigger rule but still be intentionally ignored instead of starting another run.

* **Window**: Identical payloads are deduplicated for 1 minute.
* **Trigger another run**: Include a varying field, such as a timestamp, to make otherwise-identical payloads unique.

Deduplicated webhook deliveries return counters that distinguish matching events from accepted runs:

```json theme={null}
  {
    "ok": true,
    "matched": 1,
    "accepted": 0,
    "deduplicated": 1
  }
```

| Field          | Type    | Description                                                                                                                                                                                                                 |
| -------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ok`           | Boolean | Whether the webhook request was processed successfully.                                                                                                                                                                     |
| `matched`      | Number  | Number of automation triggers whose matching rules matched the event. This can be positive while `accepted` is `0` when the delivery was deduplicated, meaning the event matched a trigger rule but no new run was started. |
| `accepted`     | Number  | Number of new automation runs started. This is `0` when a matching delivery is deduplicated.                                                                                                                                |
| `deduplicated` | Number  | Number of matching deliveries ignored because an identical payload was already received within the 1-minute window.                                                                                                         |

## Who can manage automations

| Action                           | Creator | Workspace admin | Automation admin                                 | Other channel members |
| -------------------------------- | ------- | --------------- | ------------------------------------------------ | --------------------- |
| Edit, pause, resume, or delete   | Yes     | Yes             | Yes, when Automation admin management is enabled | No                    |
| Run immediately (recurring only) | Yes     | Yes             | Yes (channels only)                              | Yes (channels only)   |
| Stop a running automation        | Yes     | Yes             | Yes (channels only)                              | Yes (channels only)   |

Automations in DMs can be edited, paused, resumed, or deleted by the creator, a workspace admin, or an Automation admin when Automation admin management is enabled. Stopping a running DM automation is limited to the creator or a workspace admin. Other users cannot run or stop DM automations.

Slack channel message automations cannot be run manually. To test one, post a matching message in the channel from the configured bot or app.

## Archival

Automations are archived automatically when their place becomes unavailable:

* **DM automations** archive when the DM becomes unusable, the creator leaves the workspace, or the required `same_thread` root message disappears.
* **Channel automations** archive when the channel is deleted, the bot loses access, or the required `same_thread` root message disappears.

Archived automations are distinct from paused automations and cannot be resumed.

## Managing automations in the web app

The Automations page in the web app is available to all workspace users. It lets you create and edit scheduled automations, manage triggers, review delivery mode and inspect recent run history.

Workspace admins can see every automation and trigger in the workspace. Automation admins can see and manage same-workspace automations when Automation admin management is enabled. Other users can see automations and triggers they created. Available actions depend on your permissions and the automation type.

## What's next

<CardGroup cols={1}>
  <Card title="Scopes" href="/slack-agent/scopes" icon="shield" horizontal>
    Control which repositories and tools automation runs can access.
  </Card>

  <Card title="Thread reviews" href="/slack-agent/thread-reviews" icon="file-search" horizontal>
    Inspect the output of an automation run.
  </Card>

  <Card title="Usage" href="/slack-agent/usage" icon="chart-column-big" horizontal>
    Review activity after automations run.
  </Card>

  <Card title="Agent skills" href="/agent/skills" icon="book-copy" horizontal>
    Reuse established procedures in automation runs.
  </Card>
</CardGroup>
