> ## 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.

# CodeRabbit Automations

> Automations run CodeRabbit Agent on a schedule, on new chat messages, or on webhook events from tools such as Linear, Jira, GitHub, and PagerDuty, and deliver the results where your team works.

Cloud Only (This feature is available on CodeRabbit Cloud only. It is not available on self-hosted CodeRabbit deployments.)

A lot of engineering work starts the same way every time. A new alert needs a first look, a new ticket needs someone to find the likely cause, and a channel needs its weekly summary of what changed. Each time, someone has to notice the event, dig through the code and the other tools, and write up what they found.

An automation hands that job to [CodeRabbit Agent](https://docs.coderabbit.ai/agent.md), the AI agent that investigates your code and connected tools, answers questions, and opens pull requests. You describe the job once, and CodeRabbit runs it every time its trigger fires, with no one asking. Use an automation when the same request would otherwise come up again and again, for example to:

* Assess each new Datadog or PagerDuty alert against recent pull requests and deploys, and suggest the next step.
* Investigate each new Linear, Jira, or GitHub issue and comment with the likely cause and a suggested fix.
* Implement a fix and open a pull request when an issue gets a label.
* Post a weekly summary of customer-visible changes to a Slack channel.

A run starts on a schedule, on a new message in a Slack or Discord channel, or on a webhook event from Datadog, Sentry, PagerDuty, Google Cloud, Linear, Jira, GitHub, GitLab, Intercom, Zendesk, or Pylon, or from any service that can send a webhook. The result goes wherever the automation can write: a Slack or Discord channel, a pull request in a GitHub repository, or any connected tool, such as a comment on the Linear issue, a note on the PagerDuty incident, a page in Notion, a record in HubSpot or Salesforce, or an MCP server.

Each run uses the repositories and connections that the automation's scope allows, and its result is listed on the automation's page. No Slack or Discord app is required: a Linear issue can be the trigger and a GitHub pull request the result.

![The page of an example automation named Carrot Patch Patrol, created by @thumper: when a new issue lands in the Burrow team in Linear, dig through the code and comment with the likely cause and a fix. Stat tiles show 10 runs, a 100% success rate, an average duration of 149.8 seconds, and a last trigger 1 day ago. The configuration shows the trigger, on matching Linear webhook events, and the action, delivers to 1 destination. Recent runs list comments on issues BUN-69, BUN-68, and BUN-67, such as the carrot counter going negative when two bunnies harvest at once.](https://mintcdn.com/coderabbit/gKPHgRl-bneGQ2yQ/assets/images/automations-overview.webp?fit=max\&auto=format\&n=gKPHgRl-bneGQ2yQ\&q=85\&s=66c72a5aa0d71f007bae533f033a3c53)

An example automation: a Linear webhook trigger, one destination, and what each run posted

## How an automation works

Every automation has three parts, which match the three cards in the automation editor:

| Part | Editor card | What it defines |
| - | - | - |
| Trigger | **Trigger** | What starts a run: a schedule, a new channel message, or a webhook event. See [Triggers](https://docs.coderabbit.ai/automations/triggers.md). |
| Agent instructions | **Agent instructions** | What CodeRabbit Agent does on each run. See [Write agent instructions](https://docs.coderabbit.ai/automations/create.md#write-agent-instructions). |
| Destination | **Target** | Where the result goes: a Slack or Discord channel, a Slack DM, a GitHub repository, any connected tool CodeRabbit can write to, or several of these. See [Destinations](https://docs.coderabbit.ai/automations/destinations.md). |

When the trigger fires, CodeRabbit starts a run, follows the instructions, and delivers the result. You can follow each run on the automation's page and in **Automations** > **Activity**. See [Manage and monitor automations](https://docs.coderabbit.ai/automations/manage.md).

## Where you can create automations

| Surface | What you can create | Learn more |
| - | - | - |
| Web app | Every trigger type (schedules, Slack and Discord message triggers, and webhooks from 12 providers) and every destination type, from scratch or from a template. Message triggers reply on their own platform. | [Create an automation in the web app](https://docs.coderabbit.ai/automations/create.md#create-an-automation-in-the-web-app) |
| Slack | Automations described to `@coderabbit` in a channel or DM. For recurring and message-triggered automations, CodeRabbit runs the job once as a trial before you save it. One-time automations skip the trial and are created here. | [Automations in Slack](https://docs.coderabbit.ai/slack-agent/automations.md#create-an-automation-from-slack) |
| Discord | Automations described to CodeRabbit in a public Discord channel. | [Automations in Discord](https://docs.coderabbit.ai/discord-agent/automations.md) |
| CodeRabbit API | The same automations as the web app, through `/v1/automations`, including runs, pause, resume, and delete. | [Create automations with the API](https://docs.coderabbit.ai/automations/create.md#create-automations-with-the-api) |

All surfaces save to the same list. An automation created in Slack or Discord shows up in the web app, and you can edit it there, except one-time automations.

## Examples

> [tab] Scheduled check
>
> A platform team wants a daily report of new dependency vulnerabilities on the main branch. An engineer creates an automation in the web app with a **Scheduled** trigger that runs every weekday at 9:00 in the team's timezone, and these agent instructions:
>
> ```text theme={null}
> Check for new dependency vulnerabilities in the main branch of
> our backend repositories. Summarize anything critical, with the
> affected package, the fix version, and the services that use it.
> ```
>
> The destination is the `#platform-eng` Slack channel. After saving the automation as active, the engineer selects **Run now** to check the output right away. From then on, a fresh thread with the results appears in the channel each weekday morning.

> [tab] Message triggered
>
> A reliability team wants CodeRabbit to investigate each new Datadog alert posted in `#prod-alerts`. They create an automation with a **Slack message** trigger on that channel and add `Triggered` under **Text includes**, so only alert messages start a run. The agent instructions ask CodeRabbit to check whether the alert looks real, look at recent deploys, and suggest the next step.
>
> From then on, every matching top-level alert message in `#prod-alerts` gets a thread reply from CodeRabbit. Channel message triggers always reply in the thread of the message that started the run.

> [tab] Webhook triggered
>
> An engineering team wants CodeRabbit to pick up small, well-described Linear issues and open a fix. They open the **Implement PRs for labeled tickets** card under **Implement code changes** in the web app, choose Linear, and select **Set up**, which opens the **Create PR from Linear issue** template. The **Linear** trigger fires when an issue gets the `ready-for-agent` label. The template sets two targets: the team's GitHub repository for the pull request, and a Linear connection for the comment. The editor asks for the Linear target before it saves the automation.
>
> When someone adds the label, CodeRabbit investigates the issue, implements a fix, runs the relevant tests, opens a pull request with the CodeRabbit GitHub App, and posts the pull request link as a comment on the Linear issue. No Slack or Discord channel is involved.

For complete setups of common automations, such as [turning labeled Linear issues into pull requests](https://docs.coderabbit.ai/automations/guides/linear-issue-to-pull-request.md), incident response, and ticket triage, see [Automation guides](https://docs.coderabbit.ai/automations/guides.md).

## Who can use Automations

Automations aren't part of a CodeRabbit plan. An Essentials, Team, Advanced, or Enterprise subscription neither includes nor blocks them: runs are billed separately as [Agent minutes](https://docs.coderabbit.ai/code/access-and-billing.md#agent-minutes), like the rest of CodeRabbit Agent.

| Question | Answer |
| - | - |
| Which deployments? | CodeRabbit Cloud. Automations aren't available on CodeRabbit self-hosted. |
| What does a run cost? | Agent minutes. How they're billed depends on where the automation delivers, not on where you created it. |
| Automations without a Slack or Discord destination | Billed at the Agent rate and counted toward the organization's [monthly Agent spend cap](https://docs.coderabbit.ai/code/access-and-billing.md#monthly-spend-cap). To try them, a CodeRabbit admin selects **Activate Automations Agent trial** on the Automations page: the trial lasts 14 days for the organization, with 100 minutes per user. Enterprise plans have no trial and use paid Agent access. |
| Automations that deliver to Slack or Discord | Billed like CodeRabbit Agent for [Slack](https://docs.coderabbit.ai/slack-agent/usage.md#what-agent-minutes-mean) or [Discord](https://docs.coderabbit.ai/discord-agent/usage-and-limits.md#usage-caps). |
| Who can create one? | Any workspace member, unless a Slack workspace or Discord server limits creation there. See [Who can create automations](https://docs.coderabbit.ai/automations/create.md#who-can-create-automations). |
| Who can see or change one? | Creators manage their own, and CodeRabbit admins manage all. See [Permissions](https://docs.coderabbit.ai/automations/manage.md#permissions). |

The **Automations Agent usage** card at the top of the Automations page shows whether automations without a Slack or Discord destination can run. When they can't, it says why, such as billing not set up, an expired trial, or a reached spend cap, and **Go to billing** opens **Billing** > **Plans & products**. Until then, these automations can't be created or resumed, and their runs are recorded as failed. To cap spend for one team or channel, see [Spend limits](https://docs.coderabbit.ai/automations/manage.md#spend-limits).

## Automations and similar features

Other CodeRabbit features also run work automatically. They are configured separately:

| Feature | What it does |
| - | - |
| [Coding Agent](https://docs.coderabbit.ai/code.md) | Works on one coding task that you, a review finding, or a failing check start, in a sandbox, and delivers a commit or pull request for you to approve. An automation runs CodeRabbit Agent each time its trigger fires. |
| [Triage rules](https://docs.coderabbit.ai/triage/rules.md) | Act on open pull requests that match conditions: merge, close, fix CI, or send Slack reminders. Automations act on events from other tools and on schedules. |
| [Delta scan automation](https://docs.coderabbit.ai/security/delta-scans.md) | Starts Deep Scan delta scans after merges in GitHub repositories. |
| [Scheduled reports](https://docs.coderabbit.ai/guides/scheduled-reports.md) | Send recurring pull request reports to email or chat. |
| [Issue Enrichment](https://docs.coderabbit.ai/issues/enrichment.md) | Adds context to new issues in your Git platform as part of reviews. |

## What's next

> [card] [Create and edit automations](https://docs.coderabbit.ai/automations/create.md)
>
> Build your first automation in the web app, from chat, or with the API.

> [card] [Automation triggers](https://docs.coderabbit.ai/automations/triggers.md)
>
> Choose between schedules, channel messages, and webhook events from 12 providers.

> [card] [Automation guides](https://docs.coderabbit.ai/automations/guides.md)
>
> Set up incident response, support triage, ticket triage, and more, step by step.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.