# Slack Integration

Receive real-time notifications in **Slack** whenever a new threat is detected in your infrastructure. This guide will walk you through generating a Slack Webhook and configuring TrapEye to send alerts directly to a Slack channel. For official documentation, refer [here](https://docs.slack.dev/messaging/sending-messages-using-incoming-webhooks/).

---

## Generate a Slack Webhook

1. Access the following url to create a new Slack: [https://api.slack.com/apps?new_app=1](https://api.slack.com/apps?new_app=1).

2. Create App and Select `From scratch`.

   ![Create Slack App](~/assets/images/docs/integrations/slack/create_app.webp)

3. Choose App **Name** and **Workspace** then click `Create App`

4. From the app, select the `Incoming Webhooks` menu.

   ![Add Webhook](~/assets/images/docs/integrations/slack/add_webhook.webp)

    - **Enable** Incoming Webhooks
    - Add the bottom, click on `Add New Webhook`.
    - Select the **Workspace** and the **Channel** you want to receive TrapEye notifications and click on `Allow`.

5. From the Webhook menu, a new Webhook URL is now present. Copy the link, you will need it for the next steps.

   ![Copy Link](~/assets/images/docs/integrations/slack/copy_link.webp)

## Configure the Webhook Connector in TrapEye

1. Log in to the [TrapEye Portal](https://trapeye.anantis.io).

2. Navigate to **Settings → Integrations** and select the **Webhook** card.

   - Enable **Webhook Connector**.
    - Choose the **Slack** tab. 
    - Paste the Webhook link generated earlier.
    - Click `Save Changes` to apply the configuration.

    ![Configure TrapEye](~/assets/images/docs/integrations/slack/slack_config.webp)

## Test the Webhook Connection

With the connector enabled, click **Test Connection** in TrapEye.

A sample event will be sent to your Slack channel immediately. Confirm that the notification appears in your channel.

![Event Received](~/assets/images/docs/integrations/slack/slack_received.webp)

## Setup Complete

TrapEye platform is now fully integrated with Slack.