---
title: Integrations tab
description: Connect your account to Slack and choose which account events send
  notifications.
editUrl: true
head: []
template: doc
sidebar:
  hidden: false
  attrs: {}
pagefind: true
draft: false
---

Integrations connect your account to the services your team already works in. Slack is the one available today: it posts account event notifications to a channel, so a failed run or a revoked token reaches the people who need it. Each integration in the list is marked **Configured** or **Not configured**. Select **Slack** to open its settings.

![The Slack notifications settings with a saved webhook, with markers on Incoming webhook URL (1), Events (2) and Send test notification (3).](../../../../assets/screenshots/web-app/account-integrations-slack.png)

1. [Incoming webhook URL](#slack-notifications) - the Slack webhook Prefactor posts to.
2. [Events](#events) - the account events that send a notification.
3. [Send test notification](#test-notification) - posts a test message to the saved webhook.

## Slack notifications

Slack notifications need an incoming webhook for the channel you want to post to. Create one in Slack by following [Slack's guide to incoming webhooks](https://docs.slack.dev/messaging/sending-messages-using-incoming-webhooks/), then paste its URL into **Incoming webhook URL**. Prefactor accepts only URLs that start with `https://hooks.slack.com/services/`.

Once you save, **Incoming webhook URL** shows as a masked field you can't type in, with an **Edit** button beside it. Prefactor never shows the saved URL again, because the URL lets anyone who has it post to your channel. Select **Edit** to enter a replacement; leave the field blank to keep the saved one. When you select **Edit**, type a URL, or change the event selection, a **Cancel** button appears beside **Save Slack settings**; it puts the saved settings back.

An account has one Slack integration and one webhook. Every selected event posts to that channel, for every agent in the account.

## Events

The **Events** section lists the account events that can send a notification, in seven groups. Tick the ones you want, or use **Select all** and **Deselect all** for the whole list. Nothing is sent for an event you leave unticked. If you save with no events selected, Slack stays connected but receives nothing. Select **Save Slack settings** to apply your choices.

Events about an agent are skipped for the sample agents Prefactor creates for demos. Each message names who made the change, and most end with a **View in Prefactor** button. See [Account notifications](/platform/notifications) for what a message contains and how delivery works.

### Agent

| Event | Sent when |
| --- | --- |
| **Agent created** | An agent is created. |
| **Agent updated** | Someone saves an agent's settings, even when nothing changed. |
| **Agent retired** | An agent is retired. |
| **Agent reinstated** | A retired agent is reinstated. |
| **Agent deleted** | An agent is deleted. The message has no **View in Prefactor** button, because the agent is gone. |

### Version and deployment

| Event | Sent when |
| --- | --- |
| **Version created** | An agent version is created, including when a run registers a version Prefactor hasn't seen before. |
| **Version deployed** | A deployment's current version is set, or changed to a different version. |

### Agent instance

| Event | Sent when |
| --- | --- |
| **Agent instance registered** | A run is registered with Prefactor. |
| **Agent instance started** | A run starts. |
| **Agent instance completed** | A run finishes as Complete. The message includes how long it ran. |
| **Agent instance failed** | A run finishes as Failed. The message includes how long it ran. |
| **Agent instance cancelled** | A run is cancelled. |
| **Agent instance terminated** | Someone terminates an active run. The message includes the reason they gave. |
| **Agent instance first started** | The first run of an agent starts. Sent once per agent. |
| **Agent instance auto-completed** | Prefactor doesn't raise this event yet, so selecting it has no effect. |

### User

| Event | Sent when |
| --- | --- |
| **User invited** | Someone invites a user. The message includes their email address and role. |
| **User added** | An invited user accepts and joins the account. |

### API token

| Event | Sent when |
| --- | --- |
| **API token created** | Someone creates a token. The message includes its scope and expiry, never the token. |
| **API token suspended** | Someone suspends a token. |
| **API token revoked** | Someone revokes a token. |
| **API token first used** | A token authenticates for the first time. |

### Environment and team

| Event | Sent when |
| --- | --- |
| **Environment created** | An environment is created. |
| **Team created** | A team is created. |
| **Agent assigned to team** | An agent is created with a team, or moved to a different team. |

### Alert

| Event | Sent when |
| --- | --- |
| **Alert raised** | An alert is raised on an instance, by your agent or by a threshold rule. The title includes the severity. |
| **Alert cleared** | An alert clears. The message includes how long it was raised. |

## Test notification

**Send test notification** posts "Test notification from Prefactor." to the saved webhook, so you can confirm Slack accepts it before you rely on it. The button needs a saved webhook, and it tests the saved URL rather than a new one you've typed but not saved. When Slack accepts the message, you'll see "Slack accepted the test notification."

## Remove integration

**Remove integration** deletes the saved webhook and event choices. Prefactor first asks "Remove this Slack integration? It will stop all Slack notifications for this account." After you confirm, you're returned to the integrations list and Slack shows as Not configured. To start again, you enter a webhook and choose events from scratch.

## Related

- [Account notifications](/platform/notifications) — what a message contains and what to expect from delivery.
- [Alert](/platform/concepts/alert) — what the alert events announce.
- [Send notifications to Slack](/guides/send-notifications-to-slack) — set up the webhook and events step by step.
- [Account page](/web-app/account) — how the Account settings tabs fit together.
- [Account](/platform/concepts/account) — what an account is.