Slack
Overview
In this guide, we'll go through how to integrate your AI Assistant into Slack. Here's an overview of what we'll cover:
- Creating a dedicated Slack app
- Configuring the Slack app
- 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 and click on create a new app.
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.
Then select Create an app from scratch, set your AI Assistants’s name and select the Slack workspace you want to add it to and click Create App.
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.
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 Assistant (
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
)
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
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.
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:
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:
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.
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 Integrations, find Slack and supply the App ID, Signing Secret and the OAuth Token.
And that’s it! 🎉 Your AI chat bot is ready to be tested on Slack! YAY!