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

# Slack

> Connect your Slack workspace to Unblocked

<Tip>
  Looking to learn how to use Unblocked in Slack? See the article on [Unblocked
  for messaging
  platforms](https://docs.getunblocked.com/unblocked-for-messaging-platforms#asking-questions).
  Need to add Unblocked to your Slack workspace? This page is for you.
</Tip>

When you connect Unblocked with your Slack Workspace, Unblocked uses your team's Slack conversations to improve answers. Connecting also enables:

1. Unblocked refreshes your team's data index as your team has conversations about your codebase. This means that answers to questions will reflect all conversations in the Slack channels that you authorize Unblocked to access.
2. Your team will be able to ask questions with the Unblocked bot. It will respond to questions in channels it has been added to, both when your team [@mentions it](https://docs.getunblocked.com/unblocked-for-messaging-platforms#asking-questions) or when it has a relevant answer to an open question. You can also [DM with Unblocked](https://docs.getunblocked.com/unblocked-for-messaging-platforms#direct-messages-with-unblocked) to ask questions privately. To learn more about how to interact with Unblocked in Slack, take a look at the article on [Using Unblocked in your messaging platform](/using-unblocked/in-messaging-platforms).

## Connect your Slack Workspace

<Note>
  You need to be a Slack Workspace Admin to connect Unblocked to your Slack
  workspace.
</Note>

### Sign into Unblocked

Whether you sign in with a source code manager or your SSO provider, you first need to authenticate to Unblocked.

Once you've signed in, click **Settings** in the sidebar, then **Data Sources**, then **Connect another data source**. Scroll to the messaging platforms section and select Slack.

### Sign into Slack

You'll be redirected to Slack to identify the workspace you intend to use with Unblocked. If you aren't already signed in to Slack, you’ll need to do so. Make sure you sign into a Slack account that has Workspace Admin privileges.

After signing in to Slack, Slack will ask if you want to grant permission to Unblocked to see your channels and interact in them. Click **Allow** to continue.

<img src="https://mintcdn.com/unblocked/soZi90zJ9_abJhu-/img/allow-Slack.png?fit=max&auto=format&n=soZi90zJ9_abJhu-&q=85&s=8acf918749856ad6293e9e5a3abb757d" alt="Allow-Slack" width="2880" height="1820" data-path="img/allow-Slack.png" />

### Select Slack Channels to connect

<Tip>
  You can add the bot to both public and private Slack channels. When an answer
  is found using context from a private channel you're a member of, you'll
  receive an ephemeral message (visible only to you) asking you to review and
  approve the answer before it's posted to a public channel. This ensures
  private channel content is never shared without explicit approval.
</Tip>

You will be redirected back to Unblocked where you can select the Slack channels to use with Unblocked. Although you can add Unblocked to any channels you like, Unblocked can provide the most helpful context when you use it in channels where code-specific conversations happen.

<img src="https://mintcdn.com/unblocked/dERw4g3KWwfcYc-y/img/Slack-channels.png?fit=max&auto=format&n=dERw4g3KWwfcYc-y&q=85&s=069da0ab9348d9eca5f97a93c244295d" alt="Slack-channels" width="2880" height="1820" data-path="img/Slack-channels.png" />

Once you've selected all of the channels you want Unblocked to access, click **Save Settings**.

### Invite Unblocked to Slack

In order to answer your team's questions and reference previous conversations from Slack as context, Unblocked needs to be added to the channels you've selected. Upon selecting a new channel in the Slack settings of the web dashboard, you will be prompted to invite Unblocked before saving. Click **Add and Continue** to ensure that Unblocked is added to the selected channels.

<Tip>
  You can verify that Unblocked has been added to any configured channel by
  posting the question, '<b>Is Unblocked listening?</b>' in the channel. If
  Unblocked is, in fact, listening, you will receive a response after a few
  seconds.
</Tip>

### Connecting private channels

<Note>
  Private channel support requires a paid plan. Visit our [pricing
  page](https://www.getunblocked.com/pricing) to learn more.
</Note>

Both public and private channels are supported. When the first user connects Slack as a data source, the bot can only be added to private channels where that user is a member. For additional users to add their own private channels, navigate to your Slack settings in the web dashboard. Under the "Add private channels" banner, click "Grant access".

<Note>
  App installations can be gated by Slack Workspace Admins. If this is the case
  for your Slack Workspace, you'll need to request to install the app to add
  your private channels.
</Note>

#### Data Shield behavior

[Data Shield](/team-settings/data-shield) protects all of your team's data, including private channels. When Data Shield is enabled, users are asked to link their accounts so Unblocked can use your team's data to provide personalized answers based on the data you have access to.

If you haven't linked all of your accounts, any question you ask will request that you complete this step.

In Slack, you'll receive:

1. An ephemeral message (visible only to you) asking you to link your accounts
2. After linking, an ephemeral message containing the answer to your question
3. A request to review the answer and verify it's safe to share publicly
4. An **Approve** button to authorize posting

After approval, the answer posts to the channel.

<Note>
  When Slack bots or workflows ask questions, Unblocked responds with publicly
  available content only, such as content from public Slack channels.
</Note>

## Channel Preferences

You can configure how Unblocked responds to questions for every connected channel, ensuring optimal behavior for the specific needs of each channel. This includes:

* [Customizing answer preferences](/data-sources/slack#customizing-answer-preferences)
* [Configuring auto-response frequency](/data-sources/slack#configuring-auto-responses)

You can configure channel preferences from the [web dashboard](/using-unblocked/on-the-web) or from Slack.

In the web dashboard, hover over a selected channel and click the **pencil icon** to bring up channel settings.

<img src="https://mintcdn.com/unblocked/XfgrfEzBJgxcMSOE/img/Slack-channels-settings-dashboard.png?fit=max&auto=format&n=XfgrfEzBJgxcMSOE&q=85&s=e8329a7e1135f8b5b862be65e2ebe9b7" alt="Slack-Channel-Preferences" width="2880" height="2021" data-path="img/Slack-channels-settings-dashboard.png" />

In Slack, type in `/unblocked-settings` to bring up channel settings.

<img src="https://mintcdn.com/unblocked/soZi90zJ9_abJhu-/img/Slack-channels-settings.png?fit=max&auto=format&n=soZi90zJ9_abJhu-&q=85&s=e97f0bbc1cea343ab983236f24f8a7ba" alt="Slack-Channel-Preferences" width="2760" height="1840" data-path="img/Slack-channels-settings.png" />

<Tip>
  The `/unblocked-settings` command is available to all users in private
  channels, even when [role-based access
  control](/team-settings/role-based-access) is enabled. This allows any team
  member to configure channel preferences for private channels they belong to.
</Tip>

### Customizing Answer Preferences

The custom Answer Preferences feature lets you tailor responses for each selected channel. You can control four main aspects of the answers:

1. **Data Sources**: Choose a [Data Sources Preset](/data-sources/data-source-presets) to determine which data sources you want to include in your answer.

2. **Answer Length**: Choose concise or detailed responses, determining how much information is included.

3. **Answer Tone**: Select a tone that suits the needs of the channel, from casual to technical, affecting the level of technical detail and inclusion of code examples.

4. **Research Depth**: Opt for quick or thorough research. A thorough setting enables Unblocked to handle complex questions with multiple retrieval and reasoning steps, though it may increase response time.

### Configuring Auto-Responses

The [Auto-response feature](https://docs.getunblocked.com/unblocked-for-messaging-platforms#unblocked-auto-responses) is automatically enabled for every channel you select. This feature allows Unblocked to respond to questions asked in Slack channels, even when Unblocked is not @mentioned. Unblocked will only respond to questions when it has an answer.

You can configure when Unblocked should auto-respond by selecting one of the following options:

* **High confidence**: Unblocked will only respond when it is highly confident it has a good answer. This may result in a lower volume of questions answered.
* **Moderate confidence**: Unblocked will respond with moderate confidence to more questions. Choose this setting if you want Unblocked to respond to a higher volume of questions.
* **Don't auto-respond**: Unblocked will not automatically respond. (Unblocked will still respond if a user @mentions it.)

<Tip>
  To start, we recommend enabling the Auto-response feature for support-related
  or cross-platform channels, such as **#customer-questions** or
  **#ask-devops**.
</Tip>

### Managing Default Preferences

When a channel is selected and connected to Unblocked, it inherits the following set of default preferences:

* **All sources**: Unblocked will respond to questions using all connected data sources as references.
* **Default Answer Length**: Unblocked will respond to questions with balanced conciseness.
* **Default Answer Tone**: Unblocked will respond to questions with balanced technical detail.
* **Default Research Depth**: Unblocked will respond to questions with balanced research depth.
* **High confidence**: Unblocked will only respond to questions when it is highly confident it has a good answer.

To modify the default preferences, click the context menu at the top of the page, and select **Manage Channel Preferences** to bring up the default channel settings.

<img src="https://mintcdn.com/unblocked/6EnUukZ0PqneZZya/img/slack-default-preferences-menu.png?fit=max&auto=format&n=6EnUukZ0PqneZZya&q=85&s=55e3fd42d8caa4ed8151b033f632ba95" alt="Slack-default-settings" width="2880" height="1811" data-path="img/slack-default-preferences-menu.png" />

Update the settings to your preferred configuration and click **Done**. Your changes will then be inherited by all newly selected channels.

Additionally, you can apply the default preferences to all currently selected channels. In the default channel settings, check **Apply to all currently selected channels**, and click **Done**.

<img src="https://mintcdn.com/unblocked/huIyMMrsU-cj3883/img/slack-default-preferences-checkbox.png?fit=max&auto=format&n=huIyMMrsU-cj3883&q=85&s=5d37e672443b8c79382590346fbc5192" alt="Slack-default-settings-checkbox" width="2880" height="1804" data-path="img/slack-default-preferences-checkbox.png" />

Save all changes made to the default channel settings by clicking **Save Settings**.

## Connecting user accounts

After Slack has been connected to your Unblocked workspace, each team member will also need to associate their Slack user account with their Unblocked account. Unblocked personalizes answers based on identity, so connecting your user account will improve the quality of answers you receive from Unblocked. It will also enable the discussions you have with Unblocked on Slack to appear under [My Questions](/unblocked-chat/my-discussions).

To connect your Slack user account, click on **Settings** in the sidebar of the Unblocked web dashboard. Under **Personal Settings**, click on **User Accounts**. In the **Unlinked Accounts** section, find the row for Slack, and click **Link my account**.

You will be redirected to Slack to connect your account. Click **Allow** to grant Unblocked the necessary permissions to associate and connect your Slack identity. After redirecting back to the **User Accounts** page, you should now see your Slack account under the **Linked Accounts** section.

<img src="https://mintcdn.com/unblocked/soZi90zJ9_abJhu-/img/Slack-account-check.png?fit=max&auto=format&n=soZi90zJ9_abJhu-&q=85&s=4a5b501c5d661fcb54a637bdd50851d8" alt="Slack-Account-Confirmation" width="2880" height="1821" data-path="img/Slack-account-check.png" />

<Note>
  {" "}

  When you view discussions with Unblocked in Slack on the web dashboard, your
  GitHub username will be displayed rather than your Slack name.
</Note>

### Troubleshooting

If you have trouble signing in, ensure that your Slack workspace administrator has enabled **Sign in with Slack** for your Slack workspace.
If this setting is not enabled, you will not be able to connect your Slack user account.

<img src="https://mintcdn.com/unblocked/soZi90zJ9_abJhu-/img/Slack-admin-user-signin-settings.png?fit=max&auto=format&n=soZi90zJ9_abJhu-&q=85&s=c854bff4834136866a4cc49d18c62b8c" alt="Sign in with slack Settings" width="2600" height="1800" data-path="img/Slack-admin-user-signin-settings.png" />

## Automating with Slack Workflows and Bots

You can use Slack's built-in [Workflow Builder](https://slack.com/help/articles/360035692513-Guide-to-Slack-Workflow-Builder) to automatically send questions to Unblocked on behalf of your team. This is useful for routing form submissions, support requests, or other automated messages to Unblocked for answers.

<Note>
  When Slack workflows or bots ask questions, Unblocked responds with publicly
  available content only, such as content from public Slack channels.
</Note>

### Setting Up a Workflow

To create a workflow that sends questions to Unblocked, follow these steps:

<Steps>
  <Step title="Create a new workflow in Slack">
    Open Slack and navigate to **Tools** > **Workflow Builder**. Click **Create Workflow** and choose your trigger — for example, a form submission or a new message in a channel.
  </Step>

  <Step title="Add a form step (optional)">
    If you want users to submit questions through a form, add a **Collect info in a form** step. Add a text field for the question, such as "What is your question for Unblocked?".
  </Step>

  <Step title="Add a 'Send a message to a channel' step">
    Add a **Send a message to a channel** step to your workflow. Configure it as follows:

    * **Select a channel**: Choose the variable **Channel where the workflow was used**, or select a specific channel where Unblocked has been added.
    * **Add a message**: Compose your message to include:
      1. An `@mention` of the person who submitted the form (use **Insert a variable** > **Person who submitted the form**). This `@mention` is **required** — Unblocked uses it to identify the user who asked the question.
      2. An `@Unblocked` mention to trigger Unblocked
      3. The question variable (use **Insert a variable** > **Answer to: What is your question for Unblocked?**)

    Your message should look something like:

    `{Person who submitted the form} @Unblocked {Answer to: What is your question for Unblocked?}`

    <img src="https://mintcdn.com/unblocked/cYCCi40amww7iCGs/img/slack-workflow-message-step.png?fit=max&auto=format&n=cYCCi40amww7iCGs&q=85&s=80528c3a37bc8ae6e995275709200da2" alt="Slack Workflow Message Step" width="1536" height="1024" data-path="img/slack-workflow-message-step.png" />
  </Step>

  <Step title="Save and publish the workflow">
    Click **Save** to save the step, then **Publish** the workflow. Your team can now use it to submit questions to Unblocked automatically.
  </Step>
</Steps>

<Tip>
  Make sure Unblocked has been added to any channel where the workflow will post messages. You can verify this by posting '<b>Is Unblocked listening?</b>' in the channel.
</Tip>

### Setting Up a Slack Bot

If you have a custom Slack bot that needs to ask Unblocked questions on behalf of users, the bot can post messages to any channel where Unblocked has been added. To trigger a response, the bot's message must `@mention` Unblocked.

When composing the message, include:

1. **An `@mention` of the user who asked the question** — this is **required**. Unblocked uses this to identify the user on whose behalf the question is being asked.
2. **An `@Unblocked` mention** — this triggers Unblocked to respond in a thread.
3. **The question** — the actual question text.

For example, using the Slack API's [`chat.postMessage`](https://api.slack.com/methods/chat.postMessage) method:

```
<@USER_ID> <@UNBLOCKED_BOT_ID> How do I set up CI for this repo?
```

<Note>
  To mention Unblocked in a bot message, you'll need Unblocked's bot user ID. You can find this
  by looking up the Unblocked app in your Slack workspace's app directory, or by right-clicking
  the Unblocked bot in any channel and selecting **Copy member ID**.
</Note>

<Tip>
  Make sure Unblocked has been added to any channel where your bot will post messages. You can verify this by posting '<b>Is Unblocked listening?</b>' in the channel.
</Tip>

## Using Unblocked in Slack

At this point, you can now interact with Unblocked in Slack. Unblocked will incorporate past and future conversations about your codebase to answer any questions that you and your team ask.

You'll be able to add more channels for Unblocked to access or manage the current set of channels configured with Unblocked by returning to the Unblocked data source page for Slack.
