Skip to main content

What you get

For each new alert, CodeRabbit posts an assessment: whether the alert looks real, the likely impact and failure domain, recent changes that could explain it, and the next step for the owner. The templates tell it not to change code, roll back deployments, or change the incident. Pick the route by where your alerts arrive and where the assessment should go:

Before you start

A channel message trigger starts a run for every matching message, so a busy alert channel needs its own limit. In the assignment, the Automation limit is a USD amount per monthly billing period: Use Slack default, No limit, or Set limit. Zero blocks new paid runs. See Scope and spend limits.

Set it up

Alerts already post to a Slack channel

The quickest setup runs on every new top-level message in the channel:
1

Open the template

In the alert channel, run /automations and start a new automation. In Purpose, choose Respond to incidents. In When to run, choose New channel message.
2

Edit the instructions

The template classifies each alert as Real, Likely noise, or Unclear, checks pull requests and deploys from the last 48 hours, suggests owners and the next recovery step, and keeps the reply under 15 lines. Edit the Agent instructions (the /automations form takes up to 3,000 characters; the web editor takes up to 20,000) to name your services or runbooks.
3

Check the connections

Check that Connections Available lists your repositories and the alert source. If one is missing, change the channel’s scope in Slack > Channel mappings.
4

Save

Select Save and activate. The automation is active right away, without a trial run.
To run only on alert messages and not on every post, add a filter:
  • By text. Open the automation from Automations > Home, select Edit, and add phrases such as Triggered under Text includes in the Trigger card. See Channel messages.
  • By author and text. Create the automation in chat instead of with /automations. Ask @coderabbit in the channel and name both the alerting bot or app and the phrases, for example:
    Slack message
    CodeRabbit does one trial run, then shows an Automation draft ready card; select Create automation. See Create an automation from Slack.
How the filters combine:
  • A message must match both the author filter and the text filter.
  • Several phrases match any one of them, as a case-insensitive substring. Several authors match any one of them.
  • Messages from bots and apps count. Thread replies and CodeRabbit’s own messages never start a run.
The web editor and the automation’s page show only the channel and the text filter. To change an author filter, ask @coderabbit in the channel.

Datadog alerts to a Slack channel

1

Open the template

In the web app, open Slack > Automations and, under Prebuilt automations, select Triage Datadog alert. The trigger is Datadog with the monitor.alert event and a read-only filter that ignores recovery notifications. The instructions assess the impact, likely failure domain, immediate mitigation, and next owner action, avoid duplicate assessments for the same alert, and don’t change code.
2

Choose the channel

In the Target card, choose the Slack channel, then select Save automation.
3

Configure the webhook in Datadog

After you save, the editor shows the webhook URL and the Datadog setup steps:
  1. Open the Webhooks integration tile in Datadog and create or edit a webhook with the URL.
  2. Paste the payload JSON from the editor.
  3. Add the alert-only notification from the editor to the monitor’s message. It’s wrapped in Datadog’s is_alert condition, so recoveries don’t call the webhook.
  4. Paste the required headers JSON into the webhook’s custom headers. Leave authentication empty and Encode as form unchecked.
  5. Save.
See Other providers.
The same template posts to Discord under Discord > Automations.

PagerDuty incidents

1

Open the template

To add the assessment as a note on the incident, open Automations > Home, select Investigate alerts under Templates, and select Set up on the Assess new incidents card. The editor opens with the Add assessment to PagerDuty incident template.To post the assessment to a Slack channel instead, open Slack > Automations and, under Prebuilt automations, select Triage PagerDuty incident.Both templates run on the incident.triggered event. The instructions assess the customer impact, likely failure domain, immediate mitigation, and next owner action, and don’t change code or acknowledge, resolve, or reassign the incident.
2

Choose the destination

In the Target card, choose the PagerDuty connection or the Slack channel, then select Save automation.
CodeRabbit manages the PagerDuty webhook after a CodeRabbit admin connects PagerDuty once. The subscription covers the whole PagerDuty account, not one service or team. See Managed webhooks.

Test it

See Test a trigger.

Check the runs

Each run is listed on the automation’s page. See Automation details. What each route produces:
  • Slack channel message: a reply in the alert’s thread.
  • Datadog webhook or Triage PagerDuty incident: a new thread in the channel for each alert.
  • Add assessment to PagerDuty incident: a note on the incident.
When the channel reaches its Automation limit, new alerts don’t start runs until a CodeRabbit admin raises the limit or the billing period resets. See Spend limits.

Variations

  • Sentry or Google Cloud alerts. Create an automation with the Sentry or GCP trigger and reuse the instructions from one of these templates. See Create an automation in the web app.
  • Follow-up actions. Ask in the instructions for an Open revert PR button, or for a summary in #incidents when the verdict is Real. Webhook-triggered runs can’t post to a second channel. See Buttons, second channel, and DMs.
  • Replies in the thread. For channel message automations, ask the instructions to act on replies, for example “if someone replies fix it, open a revert PR.” See Slack channel message triggers.

What’s next

Automations in Slack

Learn how channel message triggers, thread replies, and Slack spend limits work.

Automation triggers

See every webhook provider, matching rule, and how deduplication works.

Automation guides

Set up ticket triage, support triage, and more from their templates.