> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sprig.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Slack

Sprig’s Slack integration allows customers to receive notifications about Sprig studies in their desired Slack workspace channels. Some highlights about the integration include:

* Per study configuration of Slack channels
* Three notification types: Study Connected, Study Responses, Study Completed
* Public and Private channels access
* Default catch-all Slack configuration

## Before getting started

* The Sprig Slack integration is available to all plans.
* Only a Sprig Admin, Developer, or Editor role can enable the Slack integration in Sprig, while in Slack, channel creation and application integration are determined by your [Slack administrator](https://slack.com/help/articles/201314026-Permissions-by-role-in-Slack).
* You may need to add your Slack administrator to the Sprig account so that they can install the integration. If you have added more than one product in Sprig, you may configure separate Slack channels for each product.
* Only completed survey responses will be sent to Slack through this integration. A user must click the "finish" button at the end of a survey to be considered a complete survey response, though they may skip questions within the survey.
  * Users that close a survey without finishing or leave the browser tab without finishing the active survey will not have their responses sent to Slack.

Once you have the right Slack channels available and have verified the permissions for integrating Slack, you can map specific studies to specific Slack channels, or send all your study notifications to a single Slack channel for a given environment. Listed below are some general recommendations:

* Study-level channels: a channel with a working group or stakeholders who are interested in responses for a specific study
* Default channel for all study notifications: a channel with your whole product team or stakeholders to see when any study is connected to Slack, completed, or receives a response. This is set at an environment level.

## Connecting Sprig with Slack

There are three ways to grant Sprig authorization to your Slack Workspace.

### Method 1: Integrations > Slack

1. In the Sprig app, navigate to the Slack Integrations page (Integrations > Collaboration > Slack) and click the **Connect** button.

   <img align="center" alt="Screenshot 2024-02-27 at 2.24.48 PM.png" border={false} width="400px" src="https://mintcdn.com/sprig/8rOBJC6NeyY76ru8/images/acb973a-Screenshot_2024-02-27_at_2.24.48_PM.png?fit=max&auto=format&n=8rOBJC6NeyY76ru8&q=85&s=6019ba902f7376e706f2140458c7dfc0" data-path="images/acb973a-Screenshot_2024-02-27_at_2.24.48_PM.png" />
2. Slack will ask for permission to connect with Sprig. Please make sure you have the intended workspace selected and then click **Allow.**
   1. Sprig will request the following bot scopes: `channels:read`, `chat:write`, `team:read`, `chat:write.public`
   2. If you’d like Sprig to send notifications to a private channel, toggling  “Private channel access”, will also request the `groups:read`  and `group:write` scopes.
   3. For more information on Slack Oauth2 scopes, please feel free to refer to the [Slack documentation](https://api.slack.com/scopes).

<img align="center" border={false} width="300px" src="https://mintcdn.com/sprig/8rOBJC6NeyY76ru8/images/b76c877-image.png?fit=max&auto=format&n=8rOBJC6NeyY76ru8&q=85&s=b70fcb39c5b52d52d16b387775ab6334" data-path="images/b76c877-image.png" />

3. Once authorized, you will be redirected to the **Slack Integration page.** To turn on study-level notifications, navigate to an in-progress study’s Connect tab to choose a channel.

### Method 2: Study launch modal

1. Once a study is launched, click **Connect** on the launch modal’s Slack banner.

<img align="center" alt="Untitled" border={false} width="300px" src="https://mintcdn.com/sprig/_ephcOEAcdx-CRO7/images/18661cf-Untitled.png?fit=max&auto=format&n=_ephcOEAcdx-CRO7&q=85&s=462ee7ea9210e82256791db4b01f6bfd" data-path="images/18661cf-Untitled.png" />

2. Slack will ask for permission to connect with Sprig. Please make sure you have the intended workspace selected, then click **Allow.**

<img align="center" border={false} width="300px" src="https://mintcdn.com/sprig/8rOBJC6NeyY76ru8/images/b76c877-image.png?fit=max&auto=format&n=8rOBJC6NeyY76ru8&q=85&s=b70fcb39c5b52d52d16b387775ab6334" data-path="images/b76c877-image.png" />

3. Once authorized, you will be redirected to the **Connect tab** for your recently launched study. From here, you can set one or more Slack channels to receive response notifications.

### Method 3: Results page

1. For any in-progress study, navigate to the study’s results page and click on the **Connect tab**. From here, click **Connect.**
2. Slack will ask for permission to connect with Sprig. Please make sure you have the intended workspace selected, then click **Allow.**

<img align="center" border={false} width="300px" src="https://mintcdn.com/sprig/8rOBJC6NeyY76ru8/images/b76c877-image.png?fit=max&auto=format&n=8rOBJC6NeyY76ru8&q=85&s=b70fcb39c5b52d52d16b387775ab6334" data-path="images/b76c877-image.png" />

3. Once authorized, you will be redirected back to the **Connect tab** for your recently launched study. From here, you can set one or more Slack channels to receive response notifications.

## Connect to private Slack channels

The Sprig bot must be invited to any private Slack channel that you wish to receive notifications.

1. In Slack, navigate to the private channel and click on the channel name to **Get channel details.**
2. In the modal that appears, select the **Integrations** tab, and click **Add an App.**

<img align="center" border={false} width="400px" src="https://mintcdn.com/sprig/_1uWncsTBTa1sJbM/images/cd315a2-image_1.png?fit=max&auto=format&n=_1uWncsTBTa1sJbM&q=85&s=b9edf5b0d71e32522c6d82dcb82c82a4" data-path="images/cd315a2-image_1.png" />

3. **Sprig** should be listed in the **In your workspace** section. Click **Add** to invite the Sprig bot to your private channel.

<img align="center" border={false} width="400px" src="https://mintcdn.com/sprig/8rOBJC6NeyY76ru8/images/98dc2e0-image_2.png?fit=max&auto=format&n=8rOBJC6NeyY76ru8&q=85&s=0e4c3dd416c3626d12ff603c0dacaa8a" data-path="images/98dc2e0-image_2.png" />

4. In Sprig, you will now see your private channel as an option in the Select Channel dropdown. Private channels are denoted with a lock icon.

<img align="center" alt="Screenshot 2024-02-27 at 2.29.07 PM.png" border={false} width="400px" src="https://mintcdn.com/sprig/IibAYOcivdkTylH0/images/676b666-Screenshot_2024-02-27_at_2.29.07_PM.png?fit=max&auto=format&n=IibAYOcivdkTylH0&q=85&s=3933a7eae5ab8d91a7613572c684d660" data-path="images/676b666-Screenshot_2024-02-27_at_2.29.07_PM.png" />

* Note: If you have trouble connecting private Slack channels, your Slack connection may not have Private Channel Access enabled. This setting must be enabled prior to connecting your Slack workspace to Sprig. In order to fix this, on the Slack Integrations page, you must disconnect Slack, toggle on **Private Channel Access**, and re-connect Slack.

<img align="center" alt="Untitled" border={false} width="400px" src="https://mintcdn.com/sprig/8rOBJC6NeyY76ru8/images/9076752-Untitled_2.png?fit=max&auto=format&n=8rOBJC6NeyY76ru8&q=85&s=c651a9044a87d887be6ae61811b8ce1d" data-path="images/9076752-Untitled_2.png" />

## Notification settings

<img align="center" alt="Untitled" border={false} width="400px" src="https://mintcdn.com/sprig/8rOBJC6NeyY76ru8/images/8b0a607-Untitled_3.png?fit=max&auto=format&n=8rOBJC6NeyY76ru8&q=85&s=8c2b867dd6aef919887c3462085d0426" data-path="images/8b0a607-Untitled_3.png" />

### Default Channel (Optional)

You can set a **Default channel for all study notifications**. This channel will receive a notification when any study is connected to Slack, completed, or receives a response. This is set at an **environment** level. If you do not wish to receive messages across all studies, leave it as Not Set.

### User Emails (Optional)

You can include a respondent’s email address in study response notifications by toggling it on under Notification Settings. The email address is populated from visitor attributes. This is set at an environment level.

## Disconnecting Slack

To remove the Slack integration, click the **Disconnect** button on the Slack Integration page, and on the modal, choose whether to save your channel settings and click **Disconnect**. This will remove the Sprig App from your workspace and stop all Sprig notifications from being sent to Slack.

For more information, visit the [Sprig Privacy Policy](https://sprig.com/privacy-policy).

<img align="center" border={false} width="350px" src="https://mintcdn.com/sprig/IibAYOcivdkTylH0/images/5a9035d-Untitled_4.png?fit=max&auto=format&n=IibAYOcivdkTylH0&q=85&s=204e49c10ec547bea025eb911aab6cb6" data-path="images/5a9035d-Untitled_4.png" />
