# Connect Slack

This guide walks you through connecting Slack to your Genie environment so your team can interact with the AI assistant directly from Slack channels and direct messages.

***

## Prerequisites

* A Genie account with a running server
* A Slack workspace where you have permission to install apps

***

## Step 1: Open Slack Setup in Genie

Go to your Genie dashboard → **Settings** → **Channels** → **Slack** and click **Set up Slack**.

You will see a 5-step setup summary along with an app manifest. Click **Copy Manifest** to copy the JSON to your clipboard.

![Genie Slack setup page with instructions and manifest](/files/mkGor7Twq9z74I5tPubY)

***

## Step 2: Create a Slack App from the Manifest

1. Go to [Slack App Settings](https://api.slack.com/apps) and click **Create New App**.

![Slack API Your Apps page](/files/9M5heNEW1n2VdfXvNnMk)

2. Select **From an app manifest**.

![Create an app dialog — choose From a manifest](/files/u8OC3RgETUHWcQiPrpFP)

3. Pick the workspace where you want to install the app and click **Next**.

![Pick a workspace to develop your app](/files/sC82Hp9n9sQXA9rZEmj9)

4. Paste the manifest JSON you copied from Genie and click **Next**.

![Paste the app manifest JSON](/files/NdBnG6PvvJmvY4Rt9MlN)

5. Review the app summary — you will see the bot scopes, slash commands, and other settings pre-configured by the manifest. Click **Create**.

![Review summary and create your app](/files/dCe7hmjGKAFGpQRkdjfi)

Your app is now created. You will land on the **Basic Information** page.

![App created — Basic Information page](/files/oseUJiQxiSgFHKKQrMgV)

***

## Step 3: Verify Socket Mode

In the left sidebar, go to **Socket Mode** and verify that the toggle is **enabled** (green). The manifest should have already enabled this for you.

![Socket Mode enabled](/files/A3ogAJJDC7WSXLPr5e64)

***

## Step 4: Generate an App-Level Token

1. Go to **Basic Information** and scroll down to the **App-Level Tokens** section. Click **Generate Token and Scopes**.

![App-Level Tokens section](/files/VZ7cKOTXuN0mtlDwBkIE)

2. Name the token (e.g. "genie"), add the `connections:write` scope, and click **Generate**.

![Generate token dialog with connections:write scope](/files/xdX0hjjK4U1UUVRI8NlN)

3. Copy the **App Token** — it starts with `xapp-`. You will need this in a later step.

![Generated app-level token — copy the xapp- token](/files/RuXFFYmYSYK3icylUkN0)

***

## Step 5: Install to Workspace and Copy Bot Token

1. In the left sidebar, go to **OAuth & Permissions**. Click **Install to Workspace**.

![OAuth & Permissions — Install to Workspace button](/files/yI9t0q3M8hJ7nPosIDIj)

2. Review the permissions and click **Allow**.

![Allow the Genie app to access Slack](/files/y7G4Z98ne0eHDXb6mMqm)

3. After installation, copy the **Bot User OAuth Token** — it starts with `xoxb-`.

![Bot User OAuth Token visible after installation](/files/o2jEpg6IVjnmbRWmRVBB)

***

## Step 6: Save Tokens in Genie

Go back to your Genie settings. Paste both tokens:

* **Bot Token** (`xoxb-...`) in the first field
* **App Token** (`xapp-...`) in the second field

Click **Save & Connect**.

![Tokens pasted in Genie settings](/files/1UxShBcjGVsZ1mzWqU0N)

The status should change to **Connected**.

![Slack connection status showing Connected](/files/dKNdjCwghPWlsT5pf5m8)

***

## Step 7: Pair Your Slack Account

1. Open Slack and send a direct message to the Genie bot (e.g. "Hey!").
2. The bot will respond with a **pairing code** and your Slack user ID.

![Slack DM showing pairing code from Genie bot](/files/aLHr7gGCzW7zeP2Dr5Ul)

3. Go back to Genie settings. Under **Pending Chat Requests**, you will see the pairing request. Click **Approve**.

![Pending chat request with Approve button in Genie settings](/files/ZqbzVBeBa2kyavsZtK8Q)

***

## Step 8: Start Chatting

After approval, the bot confirms access in Slack. You can now interact with your AI assistant directly from Slack.

![Active conversation with Genie in Slack](/files/rOftMOBQV8cTzdsNokq4)

***

## Configuration Options

Once connected, you can configure how the bot behaves from the Genie settings panel:

* **DM Policy** — `Pairing` requires an approval code before a user can chat via DM
* **Group Policy** — `Allowlist` restricts the bot to pre-approved channels
* **Allowed Channels** — specify which Slack channels the bot can respond in
* **Require Mention** — when enabled, the bot only responds when @mentioned in channels
* **User Allowlist** — restrict access to specific Slack user IDs

***

## Tips

* Each user who wants to chat with the bot must complete the pairing flow individually
* Use **Require Mention** in busy channels to keep noise down
* Set up **Allowed Channels** to control where the bot is active
* The bot uses your full server context — same files, tools, and configurations as the browser
* All interactions consume credits from the Genie account that connected the bot


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.deva.me/guides/connect-slack.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
