# Slack

Firefly integrates with Slack to provide rich notifications for various events and alerts. This integration enables teams to receive real-time updates about infrastructure changes, policy violations, drift detection, and other important events directly in their Slack channels.

When integrating an Slack, you have two primary methods:

* [Slack App](#slack-app).
* [Slack Webhook](#slack-webhook).

## Prerequisites

* A Slack workspace with administrative access.
* Appropriate permissions to install apps or create webhooks.
* Channels where you want to receive Firefly notifications.

## Setup Procedure

### Slack App (Recommended Method)

1. In Firefly, click **Settings > Integrations**.
2. Click **Add New > Slack** (under messaging integrations).
3. Select **Slack App** from the Integration type field.
4. Click to install the Firefly Slack application.
5. Authorize the app in your workspace.
6. Select the desired channel for notifications.
7. Click **Next**.
8. Click **Done**.

### Slack Webhook (Legacy Method)

> **Note**: This integration is deprecated. We recommend using the Slack App integration.

1. Generate a webhook URL for your Slack channel:
   * Visit the [Incoming Webhooks](https://gofireflyio.slack.com/apps/A0F7XDUAZ-incoming-webhooks?tab=more_info) page.
   * Click **Add to Slack**.
   * Choose a channel.
   * Click **Add Incoming Webhooks integration**.
   * Copy the Webhook URL.
2. In Firefly, click **Settings > Integrations**.
3. Click **Add New > Slack**.
4. Select **Slack Webhook** from the Integration type field.
5. Enter a descriptive name in the **Nickname** field.
6. Paste the webhook URL.
7. Click **Next**.
8. Click **Done**.

## Features Enabled

* **Real-time Notifications**: Receive immediate alerts for important events.
* **Rich Message Formatting**: Detailed, formatted messages with direct links to Firefly.
* **Customizable Alerts**: Configure which events trigger notifications.
* **Channel-specific Routing**: Send different types of alerts to different channels.
* **Interactive Messages**: Click through to Firefly directly from Slack notifications.

> **Note:** In the integration settings page, use the notifcation test button to test the integration.
