# Slack

> Connect Quickchat AI to Slack. Create a Slack app, configure the manifest, and link it to your Quickchat AI Agent.

In this guide, we'll go through how to integrate your AI Agent into Slack. Here's an overview of what we'll cover:

1. Creating a dedicated Slack app
2. Configuring the Slack app
3. Integrating your Slack bot with Quickchat AI

## Create your Slack app

To begin the integration process, you will need a Slack app for your AI chat bot. Head over to [api.slack.com/apps](https://api.slack.com/apps) and click on **create a new app**.

:::tip
Here, we walk through creating the app from scratch. If you’ve done this sort of thing before, you can go directly to building from app manifest that we provide below.
:::

![create_slack_app_1](https://docs.quickchat.ai/_astro/create_slack_app_1.B3Po1y0t.png)

Then select **Create an app from scratch**, set your AI Agents’s name and select the Slack workspace you want to add it to and click **Create App**.

![create_slack_app_2](https://docs.quickchat.ai/_astro/create_slack_app_2.BnYM3ZhZ.png)

![create_slack_app_3](https://docs.quickchat.ai/_astro/create_slack_app_3.CmV8idzN.png)

## Configure your Slack app

Slack has a neat way of configuring your entire app in one go. You do it through the so called **manifest** file which contains all of your app’s configuration. Upon creating the app, you will be redirected to the App Settings. Within the Features section in the menu panel, navigate to App Manifest.

![create_slack_app_5](https://docs.quickchat.ai/_astro/create_slack_app_5.BAOomnyI.png)

Below we have prepared a manifest file which you should paste into Slack's App Manifest window (make sure you paste YAML, not JSON). You can easily copy and paste without worrying about the details. We explain the most important lines below:

- **Set the appropriate name and description for your AI Agent** (`display_information`)
- **Make sure your bot’s messages tab has been enabled** (`features/app_home/messages_tab_enabled`)
- **Set permission scope for bot so it can read and write chat messages** (`oauth_config/scopes`)
- **Set the appropriate bot events to be handled by our Quickchat server** (`settings/event_subscriptions/bot_events`)

```yaml
display_information:
  name: Talk to AI
  description: Talk to me about Quickchat!
features:
  app_home:
    home_tab_enabled: false
    messages_tab_enabled: true
    messages_tab_read_only_enabled: false
  bot_user:
    display_name: Talk to AI
    always_online: true
oauth_config:
  scopes:
    bot:
      - im:history
      - im:write
      - chat:write
settings:
  event_subscriptions:
    request_url: https://slack.quickchat.ai/chat/
    bot_events:
      - message.im
      - app_home_opened
  org_deploy_enabled: false
  socket_mode_enabled: false
  token_rotation_enabled: false
```

:::tip
If you would also like to be able to @mention the bot in other channels and receive responses in threads, expand the manifest file as follows.
:::

```yaml
display_information:
  name: Talk to AI
  description: Talk to me about Quickchat!
features:
  app_home:
    home_tab_enabled: false
    messages_tab_enabled: true
    messages_tab_read_only_enabled: false
  bot_user:
    display_name: Talk to AI
    always_online: true
oauth_config:
  scopes:
    bot:
      - im:history
      - im:write
      - chat:write
      - app_mentions:read
      - channels:history
      - groups:history
settings:
  event_subscriptions:
    request_url: https://slack.quickchat.ai/chat/
    bot_events:
      - message.im
      - app_home_opened
      - app_mention
      - message.groups
      - message.channels
  org_deploy_enabled: false
  socket_mode_enabled: false
  token_rotation_enabled: false
```

Save the manifest. Before the changes take place, you will be prompted to verify the URL by clicking on the link:

![create_slack_app_6](https://docs.quickchat.ai/_astro/create_slack_app_6.CHjw0CiG.png)

That’s it! Your bot Slack app has been configured. If you’d like to edit your bot’s look & feel, head over to Basic information under Settings, then in the Display Information Section:

![create_slack_app_7](https://docs.quickchat.ai/_astro/create_slack_app_7.CgtuStWf.png)

## Integrate your Slack bot with Quickchat AI

We are almost done. As the last step we need to Integrate the Slack bot with Quickchat AI. To do this, we first need to obtain some information from Slack:

- **App ID**: Settings → Basic Information → App Credentials
- **Signing Secret**: Settings → Basic Information → App Credentials
- **Bot User OAuth Token**: Features → OAuth & Permissions → OAuth Tokens for Your Workspace 👉 You will be prompted to install the bot into your workspace. Upon clicking **Allow** you will be redirected back to the settings where OAuth Token will be ready to copy.

![create_slack_app_8](https://docs.quickchat.ai/_astro/create_slack_app_8.DdjJ0yHo.png)

You will be needing this information in the next step, so keep the tab open.

In a new tab, open the Quickchat AI dashboard, go to **External Apps**, find Slack and supply the App ID, Signing Secret and the OAuth Token.

![slack_integration](https://docs.quickchat.ai/_astro/slack_integration.DmW-JxaA.png)

And that’s it! 🎉 **Your AI chat bot is ready to be tested on Slack!** YAY!

 <img src={SlackGif} width='100%'/>
