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

# Automation use cases

> Step-by-step setup for the most common CodeRabbit Agent automations: incident response, answering questions, support triage, engineering ticket triage, and sharing what changed.

This page walks through five automations teams commonly set up with CodeRabbit Agent for Slack. Each guide covers what you get, the connections you need, how to set it up, starter instructions you can paste, and ways to make it more useful.

For how triggers, delivery, and permissions work, see [Automations](https://docs.coderabbit.ai/slack-agent/automations.md).

## Before you start

All the automations on this page rely on the same setup. If you've already used `@coderabbit` in Slack, most of it is done.

1. **Set the Base Scope.** In the CodeRabbit web app, open **Slack** > **Scopes** and make sure the Base Scope includes the repositories the agent should read. Automations run with the same repository and tool access as a normal request in that channel. See [Scopes](https://docs.coderabbit.ai/slack-agent/connections-and-scopes.md).
2. **Connect your tools.** Go to **Connections** > **Add connection**. Each guide below lists the connections it needs. Only global admins and scope admins can add connections, and a saved connection isn't used until it's added to the Slack Base Scope or to a named scope. See [Connections](https://docs.coderabbit.ai/connections.md).
3. **Add the bot to private channels.** CodeRabbit joins public channels automatically. For a private channel, run `/invite @coderabbit` in the channel first. Otherwise, saving the automation fails with "CodeRabbit could not post in that Slack channel."
4. **Check who can create automations.** In **Account Settings**, the automation creation setting can be **Any user** (the default), **Slack admins or above**, or **Automation admins or above**. If people see a message that only admins can create automations in this workspace, an admin needs to change this setting or create the automation for them.
5. **Set a budget.** Automation runs use [Agent minutes](https://docs.coderabbit.ai/slack-agent/usage.md), the same as manual requests. In **Slack** > **Scopes**, each scope has an **Automation spend limit** that is separate from its **User spend limit**. For channels where every message can start a run, such as the [question](#answer-code-and-product-questions) and [support](#triage-incoming-support-tickets) automations, add a named scope for that channel with its own automation limit.

## Three ways to create an automation

| Where | Best for | How |
| - | - | - |
| **Slack chat** | Your first automation, scheduled jobs, and jobs that watch a channel | Mention `@coderabbit` and describe the job and when it should run. The agent runs it once so you can see the output, then shows an **Automation draft ready** card with **Create automation**, **Edit details**, and **Cancel**. Nothing is saved until you confirm. |
| **`/automations`** | Seeing and managing what runs in a channel | Type it in a channel. It lists the channel's automations and offers starter prompts. It isn't available in DMs or threads. |
| **Web app** | Webhook triggers from tools such as PagerDuty, Datadog, Jira, Linear, and Zendesk, and writing results back to those tools | Open **Automations** and create an automation. Pick a trigger, write the **Agent instructions**, choose where results go, then save it as a paused draft or turn it on. Prebuilt templates such as **Triage Linear issue** and **Add assessment to PagerDuty incident** are a good starting point. |

## Test before you trust it

* **Created in Slack chat:** the agent runs the job once before you save. Change the wording and run it again until the output looks right.
* **Schedule:** turn it on and use **Run now** to see the output right away. **Run now** isn't available while the automation is paused.
* **Slack channel message trigger:** **Run now** isn't available. Turn the automation on, then post a real message that matches, or start in a test channel. A paused automation ignores new messages.
* **Webhook:** turn the automation on, then send a test event from the other tool. For example, PagerDuty sends `pagey.ping`. The automation's run history shows whether each event matched, and whether it ran or was skipped as a duplicate.

To see what happened in any run, open the automation's run history or [thread review](https://docs.coderabbit.ai/slack-agent/thread-reviews.md). The [Usage](https://docs.coderabbit.ai/slack-agent/usage.md) page shows the Agent minutes for each run.

Several guides below add buttons, a second channel, or DMs to the result. You turn these on by describing them in the instructions. See [Buttons, second channel, and DMs](https://docs.coderabbit.ai/slack-agent/automations.md#buttons-second-channel-and-dms).

## Respond to an incident

**What you get:** when an alert fires, CodeRabbit replies in the alert's thread within minutes. The reply says whether the alert looks real or like noise, what changed recently in the affected service, who probably owns it, and what to do next. People can keep working with it in the thread, for example "open a revert PR" or "draft the RCA."

**Connections:** your observability tool. Datadog uses an API key plus an application key. Sentry, PagerDuty, and Google Cloud also work.

### Option A: watch the channel your alerts already post to

Use this if Datadog, PagerDuty, or Sentry already posts alerts in a Slack channel such as `#prod-alerts`. You don't need any webhook setup.

1. In that channel, ask:

   ```text Slack message wrap theme={null}
   @coderabbit Watch this channel. For every new Datadog alert that says "Triggered", investigate it and reply in the alert's thread using the steps below.
   ```

2. Paste the [starter instructions](#incident-starter-instructions) into the same message, send it, review the sample run, and select **Create automation**.

3. To cut noise further, limit the trigger to the alerting bot and to phrases such as `Triggered`, `P1`, or `[Prod]`.

### Option B: send alerts from the source with a webhook

Use this if your alerts don't land in Slack, or if you only want some of them, such as P1 incidents on certain services.

1. In the web app, open **Automations**, choose a **Webhook** trigger, and pick **PagerDuty**, **Datadog**, **Sentry**, or **Google Cloud**. For PagerDuty, a global admin connects PagerDuty once and CodeRabbit manages the webhook subscription for the whole account. The **Triage PagerDuty incident** and **Add assessment to PagerDuty incident** templates are a good start.
2. Choose event types, such as `incident.triggered`, and add filters such as `event.data.priority.name` equals `P1`. Datadog starts with a filter on `alert_transition` equals `Triggered`.
3. Choose the destination Slack channel.
4. Save and turn the automation on. For PagerDuty, CodeRabbit sets up the webhook for you. For Datadog, Sentry, or Google Cloud, follow the setup steps shown to add the webhook in that tool. Then send a test event.

### Incident starter instructions

```text wrap theme={null}
When a new alert arrives:
1. Verdict first: is it Real, Likely noise or Unclear? Check whether the monitor is still breaching and whether it has flapped in the last 24 hours. If it's noise, say why in one line and stop.
2. What changed: list the PRs merged and deploys to the affected service in the last 48 hours, each with its author, reviewer and a one-line summary. Put the most likely cause first.
3. Likely owners: the authors and reviewers of the most relevant PRs, plus the service owner if the knowledge base has one.
4. Next step: roll back, revert a specific PR, or look at a specific dependency.
Keep the reply under 15 lines. Don't change code, and don't acknowledge, resolve or reassign the incident unless someone in this thread asks.
```

### Make incident response more useful

* **Teach it your runbooks.** Run `/learn` or ask "@coderabbit remember that the payments service is owned by #team-payments and rollbacks go through Argo." Facts saved in public channels are shared across the workspace. You can also ask the agent to turn a good investigation into a [skill](https://docs.coderabbit.ai/agent/skills.md), so every alert gets the same checklist.
* **Keep working in the thread.** In automations created from Slack chat, the agent can also respond to later replies in the alert thread. For example: "if someone says *fix it*, open a revert PR."
* **Add one-click buttons.** End the instructions with "Add buttons: *Open revert PR* (open a PR reverting the most likely cause), *Draft RCA* (write an RCA in this thread) and *Mark as noise* (save to the knowledge base that this alert was noise)."
* **Escalate the serious ones.** Add to the instructions: "If your verdict is Real and the priority is P1, also post a 3-line summary to #incidents with a link to this thread."
* **Record the assessment in your incident tool.** Add a PagerDuty connection as a destination, or use the **Create Jira issue from PagerDuty incident**, **Create Linear issue from PagerDuty incident**, or **Create GitHub issue from PagerDuty incident** templates to file follow-up work.
* **Schedule the RCA.** In the incident thread, ask: "@coderabbit tomorrow at 10am, draft an RCA for this incident in this thread." That sets up a one-time automation.
* **Require sign-off before risky actions.** Give people the **Approver** role in the channel's scope (A named set of repositories, connections, and spend limits that controls what CodeRabbit Agent can access in a given Slack conversation.) in **Slack** > **Scopes**. When an action needs approval, the run pauses until an Approver approves or rejects it in Slack. Automation runs are covered too: the requester is the automation's creator, or whoever selected **Run now**. Each Approver needs their GitHub account linked to their Slack account, or the scope won't save.

## Answer code and product questions

**What you get:** a channel such as `#ask-eng` or `#support-eng` where support, sales, PMs, and new hires post questions. CodeRabbit replies in the thread with a plain-language answer backed by the code, the PR that changed the behavior, and the release it shipped in. Engineers only step in to correct or confirm when needed.

**Connections:** repositories (required). Add Notion, Google Drive, Linear, or Jira if answers depend on specs or known issues.

### Option A: mention the agent

Anyone can already ask `@coderabbit` in any channel the bot is in. This is the right choice for occasional questions, and needs no setup.

### Option B: answer every question in the channel

1. Create the channel, for example `#ask-eng`.

2. Recommended: in **Slack** > **Scopes**, add a named scope for this channel. Give it only the repositories and connections it needs, and set its own **Automation spend limit**, because every post can start a run.

3. In the channel, ask:

   ```text Slack message wrap theme={null}
   @coderabbit Answer every new question posted in this channel, replying in its thread, using the guidelines below.
   ```

4. Paste the [starter instructions](#question-starter-instructions) into the same message, send it, review the sample run, and select **Create automation**.

### Question starter instructions

```text wrap theme={null}
Most people asking here work in support, sales or product and can't see the code.
- If the message isn't a question about our product or code (for example an announcement or a thank-you), or an engineer has already answered, don't reply.
- Answer in plain language first, in 3–6 sentences. Then add an "Evidence" line with the relevant files or PRs.
- If the behavior changed recently, link the PR and the release it shipped in.
- Say how confident you are. If you're not sure, say so and suggest who would know (the recent authors of that code) without @-mentioning them.
- Don't paste more than 10 lines of code.
```

### Make answers more useful

* **Learn from engineer corrections.** When an engineer corrects an answer, reply with "@coderabbit remember this" or use `/learn`. Over time, the agent answers what used to need an engineer. See [Knowledge Base](https://docs.coderabbit.ai/slack-agent/knowledge-base.md).
* **Connect your docs and trackers.** With Notion, Google Drive, Linear, or Jira connected, the agent can say "this is a known issue, tracked in ENG-1234, fix planned for the next release" instead of only describing the code. Tools without a built-in connector can be added as [MCP servers](https://docs.coderabbit.ai/connections/mcp-servers.md).
* **Add a weekly FAQ digest.** Add a second, weekly automation in the same channel: "Every Friday at 3pm, summarize the questions asked this week, group repeats, and flag the ones we answered with low confidence." This shows what to document.
* **Add follow-up buttons.** End the instructions with "Add buttons: *Explain more simply* (rewrite the answer for a non-technical reader), *Save to knowledge base* (save this answer as a fact) and *Find an owner* (name who most recently changed this code)."

## Triage incoming support tickets

**What you get:** when a new ticket arrives, CodeRabbit posts a triage summary in your escalation channel within minutes. It says whether the ticket is a bug, expected behavior, or a known issue, how severe it is, which PRs, releases, or tickets are related, and includes a draft customer reply. A support engineer reviews it and, in the same thread, can ask CodeRabbit to post the reply, file a bug, or escalate.

**Connections:** your support tool (Zendesk, Intercom, or Pylon) so the agent can read the whole ticket and write back, your repositories, and an issue tracker (Linear or Jira) for filing bugs. Optional: Salesforce or HubSpot so it can rank severity by customer.

### Option A: trigger on every new ticket

1. In the web app, open **Automations**, choose a **Webhook** trigger, and pick **Zendesk**, **Intercom**, or **Pylon**.
2. Choose the events, for example `ticket.created` for Zendesk or `conversation.user.created` for Intercom. For Pylon, create a Pylon trigger with the **send webhook** action. The editor walks you through it.
3. Optional: add a filter so only some tickets run, such as `detail.priority` equals `HIGH` for Zendesk or `issue.priority` equals `urgent` for Pylon.
4. Choose the destination Slack channel, for example `#support-escalations`. Add your support tool as an additional destination if the agent should write an internal note on the ticket.
5. Save and turn the automation on, set up the webhook in your support tool by following the steps shown, and send a test ticket.

### Option B: trigger on escalations posted in Slack

If your support tool's Slack app already posts new tickets to a channel, or agents post escalations there by hand, create a Slack channel message automation in that channel instead. Ask: "@coderabbit triage every new ticket posted in this channel using the steps below." Paste the [support starter instructions](#support-starter-instructions) into the same message, send it, review the sample run, and select **Create automation**.

### Support starter instructions

```text wrap theme={null}
A new support ticket has arrived. Using the ticket, our repositories and the knowledge base:
1. Classify it as Bug, Expected behavior, Known issue or Needs more info, and explain why in two sentences, citing code or PRs.
2. Rate severity (Critical, High, Normal or Low) and say who is affected. If Salesforce or HubSpot is connected, include the customer's plan.
3. Link related PRs, the release that shipped a fix (if any), and any open Linear or Jira issue for the same problem.
4. Draft a reply to the customer in a friendly, concise support tone. Don't send it.
Post the summary in this channel with the draft reply in a quote block.
```

### Make support triage more useful

* **Keep a person in the loop before anything is sent.** The starter instructions say "Don't send it," so the automation only drafts. Add buttons that do the sending: "Add buttons: *Post as internal note* (add the draft to the ticket as an internal note), *Send reply to customer* (post the draft as a public reply), *File Linear bug* (create a Linear issue with the analysis)." Nothing reaches the customer until someone selects a button. Start with internal notes until you trust the drafts.
* **Feed it your known issues and macros.** Use `/learn` for workarounds and known issues, and ask the agent to save your triage steps as a [skill](https://docs.coderabbit.ai/agent/skills.md) so every ticket gets the same checks.
* **Rank severity by customer.** Connect Salesforce or HubSpot so the agent can weigh severity by the customer's plan or deal size.
* **Tie into incident response.** Add to the instructions: "If severity is Critical, also post a summary to #incidents." If the [incident automation](#respond-to-an-incident) watches `#incidents`, one flow feeds the other.
* **Add a weekly themes report.** "Every Monday, summarize last week's tickets in this channel by root cause, and list the top 3 code areas generating tickets." Engineering managers can use it in planning.

## Triage new engineering tickets

**What you get:** every new Linear, Jira, or GitHub issue gets a comment from CodeRabbit with the likely affected code, a suggested owner based on who has worked in that area, related PRs and possible duplicates, an effort and risk estimate, a suggested priority, and a short plan. A summary is posted in your team channel, where a lead can assign it, have a plan written, or ask CodeRabbit to open a PR.

**Connections:** your issue tracker and your repositories. Linear and Jira trigger setup needs a tracker admin to authorize once.

### Option A: triage each new ticket

1. In the web app, open **Automations** and start from the **Triage Linear issue**, **Triage Jira issue**, or **Triage GitHub issue** template. Use **Recommend fix on Linear issue** or **Recommend fix on Jira issue** if you also want a proposed fix.
2. Configure the trigger:
   * **Linear:** choose or connect a Linear workspace (CodeRabbit manages the webhook for you), pick the teams, and choose events such as `Issue.create`.
   * **Jira:** connect Jira (CodeRabbit manages the webhook) and pick up to 50 projects.
   * **GitHub:** pick a repository the CodeRabbit GitHub App already has access to and choose the `issues` event. No personal token is needed.
3. To triage only some tickets, add a filter, for example only issues with the label `needs-triage`, or only issues in a Triage status.
4. Add destinations: the tracker connection to post the comment, and a Slack channel for the summary.
5. Save, turn the automation on, and create a test issue.

### Option B: daily backlog sweep

In your team channel, ask:

```text wrap theme={null}
@coderabbit Every weekday at 8am, review Linear issues in the ENG team that are in Triage and don't have a CodeRabbit triage comment yet. Triage each one using the steps below, then post one summary here listing what you triaged.
```

Paste the [engineering ticket starter instructions](#engineering-ticket-starter-instructions) into the same message.

You can run both options together. The "don't have a CodeRabbit triage comment yet" condition stops the same issue from getting a second triage comment.

### Engineering ticket starter instructions

```text wrap theme={null}
Triage this issue:
- Affected area: the services, directories and files most likely involved.
- Likely owner: who has merged or reviewed the most PRs in that area in the last 90 days.
- Related work: open or recently merged PRs, and possible duplicate issues.
- Effort and risk: S, M or L, with one sentence on what makes it risky.
- Suggested priority and assignee, with reasons.
- A plan in 3–6 steps.
Add this as a comment on the issue. Don't change the assignee, priority or status yourself. Post a 3-line summary in this channel with a link to the issue.
```

### Make ticket triage more useful

* **Turn the plan into code.** End the instructions with "Add buttons: *Assign to suggested owner* (assign the issue to the owner you suggested), *Write full plan* (create a Coding Plan for this issue) and *Open a PR* (implement the plan and open a PR)." Coding Plans (A detailed, codebase-aware implementation plan CodeRabbit generates from an issue or description, ready to hand off to any coding agent.) turn the short plan into a full implementation plan, and CodeRabbit can implement it and open the PR. A GitHub repository can be an automation destination, so the PR is opened with the CodeRabbit GitHub App's permissions.
* **Keep code work out of the triage channel.** If [Code Channels](https://docs.coderabbit.ai/slack-agent/use-in-slack.md) are enabled, implementation moves to its own channel, and the triage channel only sees the summary.
* **Use Issue Enrichment for GitHub issues.** [Issue Enrichment](https://docs.coderabbit.ai/issues/enrichment.md) comments on new GitHub issues automatically with duplicates, related PRs, suggested assignees, and labels. Use the automation for Linear and Jira, or when you want the Slack summary and buttons.
* **Teach it who owns what.** Use `/learn` for team ownership and service boundaries that aren't clear from the code, such as "billing UI is owned by the Growth team even though Platform wrote it."
* **Follow the PRs to merge.** Once PRs are open, [Triage in Slack](https://docs.coderabbit.ai/triage/slack.md) keeps them moving with digests, reviewer requests, and reminders.

## Tell customer-facing teams what changed

**What you get:** every week, CodeRabbit posts a plain-language summary of the changes customers will notice to a channel such as `#customer-updates` or `#support`. Each item says what changed, who it affects, and how to explain it, with a link to the PR. Support, Sales, and CS can answer "what's new?" without asking an engineer.

**Connections:** none beyond your repositories. Optional: Linear or Jira so each change links to its ticket, and Zendesk, Intercom, or Pylon so the agent can point out open tickets a fix resolves.

### Set up a weekly summary

1. In the channel where the summary should go, for example `#customer-updates`, ask:

   ```text theme={null}
   @coderabbit Every Monday at 9am, summarize the customer-visible changes merged to our product repositories in the last 7 days, using the guidelines below.
   ```

2. Paste the [starter instructions](#change-summary-starter-instructions) into the same message, send it, review the sample run, and select **Create automation**.

3. If customers only see some of your repositories, name them in the request, for example "in the `web-app` and `api` repositories."

> [!TIP]
>
> Merged doesn't always mean released. If your weekly summary might list changes that haven't reached customers yet, add to the instructions: "Only include changes that are in a published release."

### Change summary starter instructions

```text wrap theme={null}
Summarize what changed for customers in the last 7 days:
- Include only changes a customer could notice: new features, behavior changes, fixes for bugs customers could hit, removed or deprecated features, and changes to limits or permissions. Skip refactors, tests, internal tools and dependency updates.
- For each change, write a plain-language headline, who it affects (everyone, admins, a plan or an integration) and one sentence Support can use to explain it. Link the PR.
- Group the changes under New, Changed, Fixed and Heads-up (removed or breaking changes).
- Flag anything that needs customers to act, such as a setting to change or a migration.
- If nothing customer-visible changed, post one line saying so.
Keep it under 25 lines and don't include code.
```

### Make change summaries more useful

* **Teach it your product's language.** Use `/learn` for the names customers see, for example "In customer-facing text, call an 'org' a 'workspace'." Once the format looks right, ask the agent to save it as a [skill](https://docs.coderabbit.ai/agent/skills.md) so every summary follows it.
* **Add buttons for the next step.** End the instructions with "Add buttons: *Draft customer email* (rewrite this as an email to customers), *Sales talking points* (rewrite the New items as three talking points) and *Help center updates* (list the help articles that may need updating)."
* **Make sure the right people see breaking changes.** Add to the instructions: "If anything is in Heads-up, also post it to #cs-leads."
* **Link the request behind each change.** With Linear or Jira connected, each item can link its ticket, so CS can tell the customers who asked for it.
* **Close the loop with Support.** With Zendesk, Intercom, or Pylon connected, add: "For each item under Fixed, list open tickets that describe the same problem." Support can then follow up with those customers.
* **Answer follow-up questions in the thread.** Anyone in the channel can reply with `@coderabbit` and a question, such as "does the export fix apply to self-hosted?" Pair this with the [question automation](#answer-code-and-product-questions) for questions that come up later.

## What's next

> **[Automations](https://docs.coderabbit.ai/slack-agent/automations.md)**
>
> Learn how triggers, delivery, and permissions work.

> **[Scopes](https://docs.coderabbit.ai/slack-agent/connections-and-scopes.md)**
>
> Control which repositories and tools automation runs can access.

> **[Agent skills](https://docs.coderabbit.ai/agent/skills.md)**
>
> Save a procedure once and reuse it in every run.


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