# Slack

## Overview

The Slack StackPack allows you to receive event notifications in Slack channels. The StackPack installs a number of event handler functions that can be used when [adding an event handler](https://archivedocs.stackstate.com/5.1/use/events/manage-event-handlers#add-event-handler) to a view in StackState.

Slack is a [StackState core integration](https://archivedocs.stackstate.com/5.1/stackpacks/about_integrations#stackstate-core-integrations).

![Slack StackPack](https://2702698828-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ft9xRpVRApnyVQrX3f8HH%2Fuploads%2Fgit-blob-1ff2d908b88e2008016e010daf6c2120084e4a97%2Fstackpack-slack.svg?alt=media)

* Event handlers added to a StackState view run an event handler function in response to events that are generated in StackState.
* A Slack event handler function sends an alert to the specified Slack Webhook URL with details of the generated event.
* An alert appears in the Slack channel associated with the specified Slack Webhook.

![Slack alert](https://2702698828-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ft9xRpVRApnyVQrX3f8HH%2Fuploads%2Fgit-blob-01e40137eff1ef8bc478bf75ef52289d52430817%2Fslack_alert.png?alt=media)

## Setup

### Install

Install the Slack StackPack from the StackState UI **StackPacks** > **Integrations** screen. You don't need to enter any details.

### Configure

After the Slack StackPack has been installed, a Slack event handler function will be listed when you [add an event handler to a view](https://archivedocs.stackstate.com/5.1/use/events/manage-event-handlers#add-event-handler).

Note that you will need to [create a Slack Webhook (slack.com)](https://api.slack.com/messaging/webhooks).

### Upgrade

When a new version of the Slack StackPack is available in your instance of StackState, you will be prompted to upgrade in the StackState UI on the page **StackPacks** > **Integrations** > **Slack**.

{% hint style="success" %}
For an overview of recent StackPack updates, check the [StackPack versions](https://archivedocs.stackstate.com/5.1/setup/upgrade-stackstate/stackpack-versions) shipped with each StackState release.
{% endhint %}

## Integration details

### Data retrieved

The Slack integration is used to send event notifications to Slack. It doesn't retrieve any data from Slack.

## Uninstall

To uninstall the Slack StackPack, go to the StackState UI **StackPacks** > **Integrations** > **Slack** screen and click **UNINSTALL**.

{% hint style="info" %}
Before you uninstall the Slack StackPack, all event handlers that have been configured to use one of the Slack event handler functions installed by the StackPack must be deleted.
{% endhint %}

## Release notes

**Slack StackPack v0.0.7 (2021-12-10)**

* Improvement: Add description text to StackPack pages.

**Slack StackPack v0.0.6 (2021-08-24)**

* Improvement: Add related problems to view health handler

**Slack StackPack v0.0.5 (2021-08-23)**

* Improvement: Include contributing causes to the problem handler
* Improvement: Support for warnings when Problems are created, merged and resolved.

## See also

* [Manage event handlers](https://archivedocs.stackstate.com/5.1/use/events/manage-event-handlers)
* [Event notifications](https://archivedocs.stackstate.com/5.1/use/events/event-notifications)
* [Problem notifications](https://archivedocs.stackstate.com/5.1/use/problem-analysis/problem_notifications)
* [Event handler functions](https://archivedocs.stackstate.com/5.1/develop/developer-guides/custom-functions/event-handler-functions)
* [Create a Slack Webhook(slack.com)](https://api.slack.com/messaging/webhooks)
