# Connect Slack

Add Justwon to your Slack workspace, choose the channels it reads, and know how to disconnect and remove it.

## Before you start

- **In Justwon:** you must be an owner or an admin of the workspace. A Slack connection belongs to the whole workspace. See [Roles](https://justwon.ai/docs/get-started/roles).
- **In Slack:** you must be allowed to add apps to your Slack workspace. By default members can add apps. If your workspace requires approved apps, a Slack workspace owner has to approve Justwon first.
- **Where to start:** start in Justwon. Justwon has to begin the connection.

## Install and connect

The steps start on the **Available** tab of **Integrations**. Selecting Slack there opens the sheet **Connect Slack**. It says what Justwon reads first and what it may do once you allow it.

1. Sign in to https://app.justwon.ai and open **Integrations**.
2. Open the **Available** tab, find **Slack** and select it. Its card says **Connect**.
3. Read the sheet **Connect Slack**, then select **Connect Slack**. A Slack window opens.
4. Choose the Slack workspace you want to connect. Slack lists what Justwon asks for. Read it and allow it.
5. The window shows **Connected**. Close it.

Justwon opens the Slack connection on its **Configuration** tab. Nothing is read from Slack yet.

## Choose the channels Justwon reads

Justwon reads only the channels you choose.

1. Under **What Justwon may read**, select the public channels to read. Choose at least one channel.
2. Under **What Justwon may do**, tick **Post messages in Slack** if you want Justwon to be able to propose a message in a channel. Tick **Send a direct message asking someone to review a finding** if you want Justwon to be able to ask a person to look at something. Nothing is ticked until you tick it.
3. Select **Connect and sync**.

For each channel, the first read goes back twelve months from the moment it runs. Later reads start where the last one stopped. Justwon joins a public channel only to read it, and only after you selected it.

Justwon asks Slack for access to public channels. It does not ask for access to private channels, and it does not read direct messages between people.

## What Justwon does in Slack

- **It reads** the messages and threads of the channels you chose, and matches the people in them to the members of your workspace by email.
- **It answers people.** Anyone in your Slack can mention Justwon in a channel or send it a direct message. A conversation that starts in Slack stays in Slack. Justwon says: "This conversation lives in Slack. Reply in the Slack thread and the agent answers there." In Justwon it is listed as **Started in Slack**.
- **It posts messages** only when an action is ticked as above and a person has approved it. A message that has been posted cannot be taken back, so a post always waits for approval.

See [what the agent does](https://justwon.ai/docs/how-it-works/what-the-agent-does) for the autonomy levels and for what always asks first.

## Permissions

| Permission | What it is used for |
| --- | --- |
| Read direct messages sent to Justwon · `im:history` | Justwon reads the direct messages people send to it so it can answer them. It does not read anyone else's direct messages. |
| Read email addresses of people · `users:read.email` | Justwon reads the email of the people in your Slack so it can match them to the same person in your CRM and your own team. |
| Read messages in the channels you choose · `channels:history` | Justwon reads the messages in the channels you choose so it can resolve them into one picture of each customer account. It does not change them. |
| Read the list of people · `users:read` | Justwon reads Slack's list of people so it can match the people on your customers' accounts to your own team, and show who owns what. |
| See messages that mention Justwon · `app_mentions:read` | Justwon reads the messages that mention it so it can answer the person who asked. It does not change them. |
| See the list of public channels · `channels:read` | Justwon reads the list of your public channels so you can choose which ones it reads. It does not change them. |
| See which direct message a question came from · `im:read` | Justwon reads which direct-message conversation a question came from so it can reply in the right place. |
| Join the channels you choose · `channels:join` | Justwon joins a channel you chose to connect when Slack reports that it is not a member yet, so it can read that channel. It joins no other channel. |
| Open direct messages · `im:write` | Justwon opens a direct message with a person to send a digest to a member who turned digests on, and for any other message only when your team has approved it or has allowed that kind of action to run on its own. Each one is logged and shown to you with its sources. |
| Post messages · `chat:write` | Justwon replies to the person who asked it in Slack, and posts any other message only when your team has approved it or has allowed that kind of action to run on its own. Each one is logged and shown to you with its sources. |
| React to messages · `reactions:write` | Justwon adds a reaction to a message that mentions it, to show that it has seen the message. |
| Show Justwon's status in Slack's assistant · `assistant:write` | Justwon shows its working status and suggested replies inside its own assistant conversation in Slack. It writes to no customer content. |

Justwon's Slack permissions are for the Justwon bot, and a few for the person who connects, so Justwon can list the channels you can choose from.

## Disconnect

1. Open **Integrations** and the **Connected** tab, and select the Slack connection.
2. Open the **Configuration** tab. Under **Disconnecting**, select the button for Slack.
3. Select **Disconnect** to confirm.

The sources it came from are closed, and are not shown or quoted again. After ten days Justwon removes the content it read from the tool; what Justwon worked out from it stays with the account. Reconnect within ten days to bring the sources back. Values filled in through field mappings are cleared, except a contract's dates. Nothing new comes in. What stays is the facts, scores and assessments, and the people and companies.

Justwon asks Slack to end the access it was given. To be sure the app is gone from Slack as well, remove it there too.

## Remove Justwon from Slack

1. In Slack, open the list of apps installed in your workspace.
2. Select Justwon and remove it.

A Slack workspace owner can do this at any time.

## If the connection does not finish

- **Slack asks for approval.** Your workspace requires approved apps. A Slack workspace owner approves Justwon for the workspace, then you start again from **Integrations**.
- **A message says to sign in to Justwon and start again from the same browser.** The Slack window could not find your Justwon sign-in. Sign in to Justwon in the browser you are using, then start again.
- **The first read is slow.** Slack limits how fast an app may read channel history, so a busy channel can take a long time. See [a connection that is stuck](https://justwon.ai/docs/troubleshooting/connection-stuck).
