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

# Slack

> Slack is a messaging app for business that connects people to the information they need.

## Creating a Slack connection

Create the connection by using one of the following methods:

* [Bot for Slack](#using-bot-for-slack)
* [Slack User](#using-slack-user)
* [Connect using a new application](#connecting-using-a-new-application)
* [Link connection to a specific channels](#link-connection-to-a-specific-channel)

## Using Bot for Slack

The following scopes are used by the **Bot for Slack** connection:

* `channels:manage`
* `channels:read`
* `chat:write`
* `files:write`
* `groups:write`
* `im:read`
* `im:write`
* `mpim:write`
* `reactions:write`
* `team:read`
* `usergroups:write`
* `users.profile:read`
* `users:read`
* `users:read.email`

### Creating your connection

1. In the Blink platform, navigate to the **Connections** page > **Add connection**. A New Connection dialog box opens displaying icons of external service providers available.
2. Select the **Slack** icon. A dialog box with name of the connection and connection methods appears.
3. (Optional) Edit the name of the connection. At a later stage you cannot edit the name.
4. Click **Bot for Slack** to authenticate using OAuth.
5. Sign in using your credentials.
6. To configure access to specific channels for your Slack connection, click [here](#link-connection-to-a-specific-channel).

## Using Slack User

The following scopes are used by the **Slack User** connection:

* `channels:read`
* `channels:write`
* `chat:write`
* `files:write`
* `groups:write`
* `im:read`
* `im:write`
* `mpim:write`
* `reactions:write`
* `team:read`
* `usergroups:write`
* `users:read`
* `users:read.email`
* `users.profile:read`

### Creating your connection

1. In the Blink platform, navigate to the **Connections** page > **Add connection**. A New Connection dialog box opens displaying icons of external service providers available.
2. Select the **Slack** icon. A dialog box with name of the connection and connection methods appear.
3. (Optional) Edit the name of the connection. At a later stage you cannot edit the name.
4. Select **Slack User** as the method to create the connection.
5. Fill in the parameters:
6. (Optional) Click **Test Connection** to test it.
7. Click **Create connection**. The new connection appears on the **Connections** page.

## Connecting using a new application

**This kind of Slack connection should not be used with Ask a Question via Slack steps.**

To create the connection you need:

* A token

### Obtaining the credentials

1. Go to [Slack API: Applications](https://api.slack.com/apps).

2. Click **Create New App**.

   <img src="https://mintcdn.com/blinkops-2/mpgGCUqut4o2ZChd/img/Slack/Untitled0.png?fit=max&auto=format&n=mpgGCUqut4o2ZChd&q=85&s=5a87590aa5145f84759ed76ec77665e9" alt="Create New App" width="849" height="463" data-path="img/Slack/Untitled0.png" />

3. Select **From scratch**.

   <img src="https://mintcdn.com/blinkops-2/mpgGCUqut4o2ZChd/img/Slack/Untitled1.png?fit=max&auto=format&n=mpgGCUqut4o2ZChd&q=85&s=be5924bd896e50ce0ec4f4d4f715c021" alt="Select From scratch" width="905" height="586" data-path="img/Slack/Untitled1.png" />

4. Fill out your **App name** and **workspace** > **Create App**.

   <img src="https://mintcdn.com/blinkops-2/mpgGCUqut4o2ZChd/img/Slack/Untitled2.png?fit=max&auto=format&n=mpgGCUqut4o2ZChd&q=85&s=3149ed55734982645c6c3ea4597b8404" alt="Fill parameters" width="708" height="638" data-path="img/Slack/Untitled2.png" />

   <img src="https://mintcdn.com/blinkops-2/mpgGCUqut4o2ZChd/img/Slack/Untitled3.png?fit=max&auto=format&n=mpgGCUqut4o2ZChd&q=85&s=109a5ae6853e74a3bfeb65a986588df1" alt="Create App" width="652" height="550" data-path="img/Slack/Untitled3.png" />

5. Select **OAuth and permissions**.

   <img src="https://mintcdn.com/blinkops-2/mpgGCUqut4o2ZChd/img/Slack/Untitled4.png?fit=max&auto=format&n=mpgGCUqut4o2ZChd&q=85&s=ee083edfa9d3bdfd580eb87f08bbfbf3" alt="Select OAuth and Permissions" width="1013" height="682" data-path="img/Slack/Untitled4.png" />

6. Navigate to **Scopes**.

   <img src="https://mintcdn.com/blinkops-2/mpgGCUqut4o2ZChd/img/Slack/Untitled5.png?fit=max&auto=format&n=mpgGCUqut4o2ZChd&q=85&s=5640ad9800ad592f0b161909baad8dab" alt="Navigate to Scopes" width="994" height="709" data-path="img/Slack/Untitled5.png" />

7. Add the following scopes for your application:

   **Bot Token Scopes:**

   ```
   - channels:manage- channels:read- chat:write- files:write- groups:read- groups:write- im:read- im:write- mpim:read- mpim:write- reactions:write- team:read- users:read- users:read.email
   ```

8. Click **Install App**.

   <img src="https://mintcdn.com/blinkops-2/mpgGCUqut4o2ZChd/img/Slack/Untitled7.png?fit=max&auto=format&n=mpgGCUqut4o2ZChd&q=85&s=f7fb06799fcb064c9a428191c629c78d" alt="Install App" width="1092" height="743" data-path="img/Slack/Untitled7.png" />

9. Click **Install to Workspace**.

   <img src="https://mintcdn.com/blinkops-2/mpgGCUqut4o2ZChd/img/Slack/Untitled8.png?fit=max&auto=format&n=mpgGCUqut4o2ZChd&q=85&s=2de619d327db24fa1db138d97a23b8e4" alt="Install to Workspace" width="969" height="399" data-path="img/Slack/Untitled8.png" />

10. **my\_app is requesting permission to access the test Slack workspace** dialog window appears > **Allow**.

    <img src="https://mintcdn.com/blinkops-2/mpgGCUqut4o2ZChd/img/Slack/Untitled9.png?fit=max&auto=format&n=mpgGCUqut4o2ZChd&q=85&s=c4bce0131ece130cff96602c9d73346b" alt="Allow dialog window" width="834" height="508" data-path="img/Slack/Untitled9.png" />

11. Return to **OAuth & permissions**.

    <img src="https://mintcdn.com/blinkops-2/mpgGCUqut4o2ZChd/img/Slack/Untitled10.png?fit=max&auto=format&n=mpgGCUqut4o2ZChd&q=85&s=64cbf887ab385e2e45f66f7c1094bce9" alt="Return to OAuth and Permissions" width="358" height="186" data-path="img/Slack/Untitled10.png" />

12. Copy your token.

    <Note>
      There are two types of tokens: A "User OAuth Token" & A "Bot User OAuth
      Token". We recommend using the Bot User OAuth Token in most cases, but
      there are a few exception, such as the "Set User Profile" action.
    </Note>

    <img src="https://mintcdn.com/blinkops-2/mpgGCUqut4o2ZChd/img/Slack/Untitled11.png?fit=max&auto=format&n=mpgGCUqut4o2ZChd&q=85&s=81901ad969715f66bb6e557117f53e81" alt="Copy Token" width="1306" height="732" data-path="img/Slack/Untitled11.png" />

### Creating your connection

1. In the Blink platform, navigate to the **Connections** page > **Add connection**. A New Connection dialog box opens displaying icons of external service providers available.
2. Select the **Slack** icon. A dialog box with name of the connection and connection methods appears.
3. (Optional) Edit the name of the connection. At a later stage you cannot edit the name.
4. Select **Token** as the method to create the connection.
5. Fill in the parameters:
   * Token
6. (Optional) Click **Test Connection** to test it.
7. Click **Create connection**. The new connection appears on the **Connections** page.

## Link connection to a specific channel

To communicate with an existing Slack channel you have to invite your app to join from Slack.

To invite your app to the channel, follow one of the following options:

1. **Slack message** Go to Slack application, and in the desired channel send the following message:

   ```
    /invite @<AppName> # For Blink OAuth, AppName will be Blink
   ```

2. **Slack UI**

   1. Select a specific channel > click the channel name.
   2. On the **Integrations** tab > **Add apps**.
   3. Choose the app from the apps list (For Blink OAuth, app name will be Blink).

3. **Slack app scope** Add [chat:write.public](https://api.slack.com/scopes/chat:write.public) scope to your application.
