# Notifications (/docs/guides/notifications)



Get notified when deployments start, succeed, fail, or when preview environments are created. Rock8Cloud supports Slack and custom webhooks.

## Accessing Notification Settings [#accessing-notification-settings]

1. Navigate to your project
2. Click the **Settings** tab
3. Scroll to the **Notifications** section

## Supported Events [#supported-events]

| Event                            | Description                                                           |
| -------------------------------- | --------------------------------------------------------------------- |
| Deployment Started               | When a deployment begins building                                     |
| Deployment Success               | When a deployment completes successfully                              |
| Deployment Failed                | When a deployment fails                                               |
| Deployment Rollback              | When a deployment is rolled back                                      |
| Preview Created                  | When a PR preview environment is ready                                |
| Preview Cleanup                  | When a PR preview is removed                                          |
| Code Review Completed            | When an AI code review finishes successfully                          |
| Code Review Failed               | When an AI code review encounters an error                            |
| Dependency Vulnerabilities Found | When the dependency scan blocks a build with critical vulnerabilities |

## Setting Up Slack [#setting-up-slack]

<Callout type="info">
  Each project can have one Slack notification channel. You can have unlimited webhook channels.
</Callout>

Slack notifications are connected at the organization level via OAuth. Once connected, you can select channels from a dropdown when configuring notifications.

### Step 1: Connect Slack Workspace [#step-1-connect-slack-workspace]

1. Go to **Settings** (gear icon in sidebar)
2. Open the **Slack** tab
3. Click **Connect Slack Workspace**
4. Authorize the app in the Slack OAuth popup
5. You should see a green "Connected" status

### Step 2: Add the Bot to Channels [#step-2-add-the-bot-to-channels]

Before a channel appears in the channel picker, the Slack bot must be a member of that channel.

In Slack, open each channel where you want to receive notifications and run:

```
/invite @Stratos
```

<Callout type="info">
  Only channels where the bot has been invited will appear in the channel dropdown. If you don't see a channel, make sure the bot is added to it first.
</Callout>

### Step 3: Add a Notification Channel [#step-3-add-a-notification-channel]

1. Navigate to your project's **Settings** tab
2. Scroll to the **Notifications** section
3. Click **Add Channel**
4. Select **Slack** as the type
5. Enter a name (e.g., "Deploys channel")
6. Select a channel from the dropdown
7. Select which events you want to receive
8. Click **Create**

### Threaded Messages and Reactions [#threaded-messages-and-reactions]

Rock8Cloud automatically groups deployment notifications into Slack threads for a cleaner channel experience.

**How it works:**

1. When a deployment starts, Rock8Cloud sends a "Deployment Started" message to your channel
2. When the deployment completes, the success or failure message is posted as a **reply in the same thread**
3. An emoji reaction is added to the original "Deployment Started" message:
   * :white\_check\_mark: for successful deployments
   * :x: for failed deployments

This keeps your channel organized and makes it easy to see deployment status at a glance.

**Preview environments:** PR preview notifications also use threading. All messages related to a single pull request (preview created, deployments, cleanup) are grouped in one thread.

**Multiple channels:** If you have multiple Slack channels configured for the same project, each channel maintains its own independent threads.

## Setting Up Webhooks [#setting-up-webhooks]

Webhooks send JSON payloads to any HTTP endpoint when events occur.

### Adding a Webhook [#adding-a-webhook]

1. In your project's notification settings, click **Add Channel**
2. Select **Webhook** as the type
3. Enter a name (e.g., "Custom integration")
4. Enter your **Webhook URL**
5. Select which events you want to receive
6. Click **Create**

### Webhook Payload Format [#webhook-payload-format]

Webhooks receive a JSON payload:

```json
{
  "event": "deployment:success",
  "timestamp": "2024-01-15T10:30:00.000Z",
  "data": {
    "serviceName": "api",
    "serviceId": "uuid",
    "projectId": "uuid",
    "deploymentId": "uuid",
    "environmentId": "uuid",
    "environmentType": "stable",
    "branch": "main",
    "commitSha": "abc1234def5678",
    "commitMessage": "feat: add new endpoint",
    "url": "https://api.example.com",
    "appUrl": "https://rock8cloud.example.com/projects/.../deployments/..."
  }
}
```

### Event-Specific Fields [#event-specific-fields]

**deployment:started:**

* `branch`, `commitSha`, `commitMessage`, `deploymentId`, `environmentId`, `environmentType`

**deployment:success / deployment:rollback:**

* `branch`, `commitSha`, `commitMessage`, `deploymentId`, `environmentId`, `environmentType`, `url`

**deployment:failed:**

* `branch`, `commitSha`, `deploymentId`, `environmentId`, `environmentType`, `error`

**preview:created:**

* `branch`, `commitSha`, `deploymentId`, `environmentId`, `previewUrl`, `pr`

**preview:cleanup:**

* `branch`, `environmentId`, `pr`

**dependency-scan:failed:**

* `branch`, `commitSha`, `deploymentId`, `environmentId`, `environmentType`, `findingCount`, `appUrl`

**code-review:completed:**

* `branch`, `commitSha`, `pr`, `findings`

**code-review:failed:**

* `branch`, `commitSha`, `pr`, `error`

## Managing Channels [#managing-channels]

### Enable/Disable [#enabledisable]

Toggle the switch next to any channel to enable or disable it without deleting the configuration.

### Edit [#edit]

Click on a channel to expand it, then click **Edit** to modify:

* Channel name
* Configuration (token/URL)
* Subscribed events

### Delete [#delete]

Click the trash icon to permanently remove a channel.

## Troubleshooting [#troubleshooting]

### Slack: No channels in dropdown [#slack-no-channels-in-dropdown]

The bot hasn't been invited to any channels. Run `/invite @Stratos` in each Slack channel where you want notifications. Then click the refresh button next to the dropdown.

### Slack: "not\_in\_channel" error [#slack-not_in_channel-error]

The bot was removed from the channel after the notification was configured. Run `/invite @Stratos` in the channel again.

### Slack: Notifications stopped working [#slack-notifications-stopped-working]

The Slack workspace connection may have expired. Go to **Settings > Slack** and reconnect the workspace.

### Webhook: No notifications received [#webhook-no-notifications-received]

1. Check that the webhook URL is accessible from the internet
2. Verify the channel is enabled
3. Confirm the event types you want are selected
4. Check your webhook endpoint logs for incoming requests
