Go back
Connecting to Slack!

2 years ago

There are currently, two ways to connect your chatbot to your Slack Workspace, the first one, it's really simple and all you have to do is go to your bot page > Configure tab > Setup Slack > and click Install APP to Slack button to grant required permissions.

The second way to connect your chatbot to your Slack Workspace, is by owning a Slack App. At first can be a bit confusing, but, by following these steps, can be accomplished in less than 5 minutes!



Connecting your Chatbot to Slack it is really easy and only requires a few steps.

First, let's start creating a developer Slack app here and make sure to link your workspace to it.

IMG 1. Creating a Slack App


Now, let's go back to your chatbot panel and head over configuration and click setup under Connecting to Slack.

IMG 2. Copy the green-colored callback URL, you are going to need it on the next step


Head over the left navigation area and select Event Subscriptions, and make sure to enable it (click on the toggle switch). Once enabled, paste your unique chatbot Callback URL (see IMG 2 reference) into the Request URL field.

In the same section, add following User Events under Subscribe to bot events section: app_home_opened, app_mention and message.im

Until this moment, this is what your bot Event Subscriptions page should look like (Request URL is different from yours):

Now, head over to the left navigation area, select OAuth & Permissions and click on Install app to workspace in order to obtain yout OAuth Access Token.
Copy your Bot User OAuth Access Token that you will find on the same section and make sure to paste it on the Page Access Token field located on your chatbot's configuration panel (see IMG 2 for reference).
On the same Slack's OAuth & Permissions section, scroll below and select Add an OAuth Scope and add each of the following scopes: channels:history, channels:read, users:read, users:read.email and chat:write. And click on Reinstall APP.
We are about to finish! just one more step!
Finally, select Interactive Components (Interactivity & Shortcuts) on the left navigation area and enable Interactivity and paste one more time your Callback URL (see IMG 2 for reference) on the Request URL field.
And that's it! To interact with your chatbot, you will have to select install an app while being on your workspace:
Note: if you would like to distribute your app through Slack App Directory or share your Slack App, you will have to fill the following fields and update accordingly:

Get started for free! and connect one bot to many channels!

Create chatbot for free