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

# Slack Adapter

> Deploy your bot to Slack

## Setup

### 1. Create Slack App

**1. Create app**

Go to [api.slack.com/apps](https://api.slack.com/apps)

**2. Enable sockets**

Enable Socket Mode in settings

**3. Add scopes**

Add `chat:write`, `channels:history`, `groups:history`, `im:history`, `mpim:history`

**4. Copy tokens**

Copy Bot Token and App Token

### 2. Install

```bash theme={null}
npm install @boostgpt/router
```

### 3. Configure

```bash .env theme={null}
SLACK_TOKEN=xoxb-your-bot-token
SLACK_SIGNING_SECRET=your-signing-secret
SLACK_APP_TOKEN=xapp-your-app-token
```

## Usage

```javascript theme={null}
import { Router, SlackAdapter } from '@boostgpt/router';

const router = new Router({
  apiKey: process.env.BOOSTGPT_API_KEY,
  projectId: process.env.BOOSTGPT_PROJECT_ID,
  adapters: [
    new SlackAdapter({
      slackToken: process.env.SLACK_TOKEN,
      slackSigningSecret: process.env.SLACK_SIGNING_SECRET,
      slackAppToken: process.env.SLACK_APP_TOKEN
    })
  ]
});

await router.start();
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.