# Slack

The Slack integration delivers real-time notifications from Interlynk to your Slack channels via incoming webhooks.

***

## Purpose

* Receive notifications for vulnerability discoveries, policy violations, license issues, and SBOM uploads.
* Route notifications to specific channels based on severity or event type.

## Setup Steps

1. Navigate to **Settings > Organization > Integrations**.
2. Click **Slack**.
3. Click **Add New** to add a Slack webhook configuration.
4. Enter:
   * **Slack Webhook URL**: An incoming webhook URL from your Slack workspace.
   * **Notification Type**: Select the notification level:
     * **All** — Receive all notifications.
     * **Alert** — Only alert-level notifications.
     * **Warning** — Only warning-level notifications.
     * **Info** — Only informational notifications.
   * **Frequency**: Currently supports **Instant** delivery.
5. Click **Save**.

### Multiple Channels

You can add multiple Slack webhook configurations to route different notification types to different channels. For example:

* `#security-alerts` — Alert notifications only
* `#sbom-updates` — Info notifications for uploads
* `#all-interlynk` — All notifications

Click **Add New** to add additional rows.

## Channel Configuration

### Creating a Slack Webhook URL

1. In Slack, navigate to **Apps > Manage > Custom Integrations > Incoming Webhooks** (or use the Slack API at `api.slack.com/apps`).
2. Create a new incoming webhook.
3. Select the target channel.
4. Copy the generated webhook URL (format: `https://hooks.slack.com/services/T.../B.../...`).
5. Paste the URL into the Interlynk Slack integration configuration.

## Event Types

Notifications are categorized into the following types:

| Category        | Examples                                                    |
| --------------- | ----------------------------------------------------------- |
| Vulnerabilities | New critical/high vulnerability discovered, severity change |
| Licenses        | License compliance violation detected                       |
| Policies        | Policy scan completed with failures                         |
| Uploads         | SBOM uploaded and processed                                 |

## Message Formatting

Slack messages from Interlynk include:

* Event type and severity level
* Affected product and environment
* Summary of the event (e.g., vulnerability ID, component name)
* Link back to the relevant Interlynk dashboard page

## Required Permissions

### Slack Workspace

* Permission to create incoming webhooks in the target workspace.

### Interlynk

| Permission           | Purpose                             |
| -------------------- | ----------------------------------- |
| `view_connections`   | View Slack integration settings     |
| `edit_connections`   | Add or update Slack webhooks        |
| `delete_connections` | Remove Slack webhook configurations |

## Security Notes

* Webhook URLs are encrypted at rest.
* Slack webhook URLs are secret — treat them like API tokens. Do not commit them to source control.
* Validate that the webhook URL points to your intended Slack workspace before saving.
* If a webhook URL is compromised, regenerate it in Slack and update the Interlynk configuration.

## Troubleshooting

| Issue                           | Cause                                    | Resolution                                                    |
| ------------------------------- | ---------------------------------------- | ------------------------------------------------------------- |
| No messages in channel          | Invalid webhook URL                      | Verify the URL is correct and the webhook is active in Slack  |
| Messages going to wrong channel | Webhook configured for different channel | Create a new webhook for the correct channel                  |
| Duplicate notifications         | Multiple webhook configs with same URL   | Remove duplicate entries in the integration settings          |
| Webhook URL rejected            | URL format invalid                       | Ensure the URL matches `https://hooks.slack.com/services/...` |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.interlynk.io/administration/slack.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
