How to create Slack chatbot using chatbot platform

Floatbot Team
Dev Tutorials
Published in
4 min readSep 22, 2018

--

Slack being one of the most famous team collaboration app it is used by over 8 million users daily which makes it very demanding. Also slack bots are started trending which enhances its usability. Therefore now creating a slack chatbot made easy with floatbot.ai.

Login to your Floatbot account or signup for floatbot if you haven’t yet, and go to your bot dashboard.

Click on configure. You will see a text bar called Slack setting. Click on Slack settings.

Here you will see different bars, some filled with information. While some marked in red. Let us step by step deal with each one of them

To get started with Slack integration, you will need to create a slack app. Go to https://api.slack.com/apps/new and create a Slack app.

Fill in the details and click on Create App.

Now let us look at SLACK APP REDIRECT URL..

Copy the URL and head to OAuth&Permissions tab in slack.
You will see the tab on left-hand side column, under the feature section. On the right-hand, go to the redirect URLs box and paste copied URL and save it.

Moving ahead with the 2nd bar SLACK APP INTERACTIVE MESSAGES ACTION URL

Copy the link and go back to Slack.

This URL has to be pasted in the interactive components on the left menu. Enable the property, paste the URL and click on enable interactive components.

The 3rd URL on the Floatbot dashboard is EVENT SUBSCRIPTIONS URL/COMMANDS REQUEST URL

Copy the URL and go to Slack. This URL has to be pasted in two different sections.

Number 1- Go to Event subscriptions on the left hand side column in slack. Enable the event and paste the URL.

Number 2- In the same column head to Slash commands. Here you will have to create a new command to paste the URL.

When you click on create a new command, you will see this screen.

Add all the details asked for and in request URL paste your copied URL.

Note: Set your command name as /start (/ is important).

Heading to the last 2 elements SLACK APP CLIENT ID AND SLACK APP CLIENT SECRET. Client ID and Client Secret are important elements to complete your slack Integration.

To get Client ID and Client Secret head to Basic information on Slack. You’ll see a box called App credentials.

Copy the client ID and Client secret. Go to Floatbot and paste it in the respective tabs. Now that’s done, click on update and your bot is configured !

Some other important terms that you need to know about Slack are:

Inviting to Channels
The slack bot needs to be invited to channels. You can invite by using a command like /invite@username (you can replace the username with your bot name)

Distributing Your Bot

Use the slack button to let people install and use your bot. Slack has a code generator on their site to get the code you have to display the Slack button.

Select the app that you created from the list and tick only the bot option. Copy the code and paste it where you want your button to be seen.

Publishing to the Slack App Directory
When your bot starts working perfectly, you can apply to list your bot in Slack App Directory.

Note: This article was originally published on Floatbot.ai.

--

--

Floatbot is Omni-Channel Customer Engagement AI Chatbot Platform with live chat support. DIY Chatbot, iBeacon support, livechat and much more