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 automation editor: pick a trigger tile, then tell CodeRabbit what to do on each run
Open Automations

The Investigate tickets template with Linear selected: CodeRabbit comments on each new Linear issue
Name the automation
Choose a trigger
Write the agent instructions
Choose a destination
Save
Test it
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.â
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.
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.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.