Skip to main content
The web app editor creates scheduled, channel message, and webhook automations. Slack and Discord chat and the CodeRabbit API are other ways to create the same automations. One-time automations are created from Slack chat.

Before you start

An automation can only use what your workspace has set up. Check these before you create one, or ask a CodeRabbit admin:

Create an automation in the web app

The Create automation editor in the CodeRabbit web app. The Trigger card shows tiles for Datadog, GCP, GitHub, GitLab, Sentry, PagerDuty, Linear, Jira, Intercom, Zendesk, Pylon, Custom, Slack message, Discord message, and Scheduled. Below it, the Agent instructions card holds the instruction Summarize merged pull requests and open deployment blockers, with Agent scope set to Workspace default and a Customize agent scope button. An Active toggle sits in the top-right corner.

The automation editor: pick a trigger tile, then tell CodeRabbit what to do on each run

1

Open Automations

In the CodeRabbit web app, select Automations > Home in the sidebar. To start from scratch, select Create Automation.To start from a template, pick a category under Templates on the same page: Investigate tickets, Investigate alerts, or Implement code changes. Each category shows a card that says what the automation does, such as Investigate new tickets or Implement PRs for labeled tickets. If the card asks you to Choose your ticketing system, pick Linear, Jira, or GitHub Issues; tools that are already connected show Connected. The row at the bottom of the card shows where the automation starts and where the result goes, for example Linear → CodeRabbit → GitHub. Select Set up to open the editor with the trigger, instructions, and destination filled in, and with the template’s name, such as Recommend fix on Linear issue, as the automation’s name.
The Templates section of the Automations page. The Investigate tickets category is selected and shows the Investigate new tickets card: when a ticket is created, CodeRabbit investigates the codebase and comments with the likely cause and a suggested fix. Under Choose your ticketing system, Linear is selected, and Linear, Jira, and GitHub Issues all show Connected. The flow row reads Linear, CodeRabbit, Linear, next to a Set up button.

The Investigate tickets template with Linear selected: CodeRabbit comments on each new Linear issue

2

Name the automation

Replace Untitled automation with a name, and optionally add a description.
3

Choose a trigger

In the Trigger card, select a tile: Scheduled, Slack message, Discord message, or one of the webhook providers, such as Linear, Jira, GitHub, or PagerDuty. Then fill in the trigger’s settings. See Automation triggers.
4

Write the agent instructions

In the Agent instructions card, tell CodeRabbit what to do on each run. See Write agent instructions.
5

Choose a destination

In the Target card, choose where results go: a Slack or Discord channel, a Slack DM, a GitHub repository, or any connected tool CodeRabbit can write to, such as Linear, Jira, PagerDuty, Notion, or HubSpot. Select Add target to deliver to more than one. See Automation destinations.
6

Save

Set the toggle next to the name to Active to start running right away, or to Paused to save a draft. Then select Save automation.
7

Test it

With the automation active, start a run: select Run now on a scheduled automation’s page, post a matching message in the channel, or cause a matching event in the other tool, such as adding the label to a Linear issue. Follow the run on the automation’s page and check what it delivered. See Test a trigger.
For a webhook provider that CodeRabbit doesn’t manage, the editor shows the webhook URL and setup steps after you save. Configure them in the other tool before you expect runs. See Webhook events. Slack and Discord have their own templates. In the web app, open Slack > Automations or Discord > Automations and look under Prebuilt automations for templates such as Triage Linear issue and Triage PagerDuty incident, which post results to a channel.

Write agent instructions

The agent instructions are the task CodeRabbit runs each time the trigger fires. They can be up to 20,000 characters. Write them the way you would brief a teammate:
  • Say what to look at. Name the repositories, services, or connected tools to check, such as “the backend repositories” or “recent deploys in Datadog”.
  • Say what to do. Investigate, summarize, recommend a fix, or implement a change and open a pull request.
  • Describe the result. Say what the output should contain and how long it should be. For webhook triggers, refer to the event, for example “the new Linear issue” or “the triggered PagerDuty incident”.
  • Say what to do when there’s nothing to report. For example, “If there are no new advisories, reply with one line saying so.”
Instructions can also ask CodeRabbit to follow an existing durable skill, so every run reuses an established procedure. The Agent instructions card also shows the automation’s Agent scope, the repositories and connections each run can use. It’s the workspace default unless you choose a shared or custom scope. See Agent scope. Each destination can also have its own instructions that say how to deliver the result, such as the format of a Linear comment. See Automation destinations. In Slack, the instructions can also add buttons to the reply, post to a second channel, or send DMs. See Buttons, second channel, and DMs.

Create an automation from chat

In Slack, ask @coderabbit to automate a job in a channel or DM, or run /automations. For a recurring or message-triggered automation, CodeRabbit runs the job once as a trial, then shows a draft card so you can review the output before anything is saved. Slack chat is also where you create one-time automations, which skip the trial. See Automations in Slack. In Discord, ask CodeRabbit in a public channel or run /automations. The automation belongs to the parent channel even when you create it in a thread. See Automations in Discord. Automations created from chat appear in the web app with the others, and you can edit them in the web app editor, except one-time automations.

Create automations with the API

The CodeRabbit API manages automations under /v1/automations. A key needs the automations:read scope to read automations and runs, and automations:write to create, update, or control them. See Authentication. The CodeRabbit MCP server offers the same operations as tools, such as create_automation and list_automation_runs, with the same scopes; see MCP tools. Updates and commands take the expected_revision that you read from the automation, so a change made in the meantime isn’t overwritten. A run_now command only starts the run; read the runs endpoint to follow it. The same permission, billing, and availability checks apply as in the web app.

Active and paused automations

Every automation is either active or paused. You choose with the Active and Paused toggle in the editor, and you can switch later from the automation’s page. See Run now, pause, resume, and delete. Save a new automation as paused when you still need to set up the other tool, such as a webhook in Datadog, or when you want a teammate to review the instructions first.

Edit an automation

Open the automation from Automations > Home and select Edit, or select Edit in the row’s menu in the list. The editor opens with the same Trigger, Agent instructions, and Target cards. Change what you need and select Save automation.
  • If you can view an automation but not manage it, the editor opens read-only. See Permissions.
  • One-time automations can’t be edited in the web app editor.

Who can create automations

Each Slack workspace and Discord server has a setting that controls who can create automations in it: CodeRabbit admins can always create automations. When the setting doesn’t include you, creating an automation fails with a message such as “Only Slack workspace admins or CodeRabbit admins can create automations in this workspace.” Ask an admin to create the automation or to change the setting. Creating an automation doesn’t require permission to add connections. If the trigger or destination needs a tool that isn’t connected yet, the editor tells you to ask a CodeRabbit admin to connect it. Adding connections requires a CodeRabbit admin. See Connections and Base Scope.

What’s next

Automation triggers

Set up schedules, channel message triggers, and webhook events.

Automation destinations

Deliver results to a channel, a ticket, an incident, or a GitHub repository.

Manage and monitor automations

Follow runs, run an automation on demand, and pause or delete it.