Slack

Connect Rocketbots to Slack.

Slack is a cloud-based set of proprietary team collaboration tools and services. A messaging platform designed for team-based worked environments, Slack has over 8 million daily users as of May 2018.

Connect to Slack in 2 Minutes

The Slack messaging platform features quick reply for users to easily respond to your bot. Your users can also send and receive attachments through Slack messages.

For a detailed list of features against the other channels, you can take a look at the comparison table.

Setting Up Slack

In order to connect Slack to your space, you will need the following:

Create a Slack App

First, you will have to create a new Slack App to connect your space to. Navigate to the Slack Developer Console.

Go ahead and press the green "Create an App" button if the Slack App Creation Menu is not already open.

The Slack App Creation Menu

Enter a name for your app and select a Team that you would like your space to be associated with. Once you have done so and have looked over the Slack API Terms of Service, click the "Create App" button.

Add a Bot User

Now that you have created your Slack App, you need to add a Bot User.

Click on "Bot Users" on the left hand menu under the "Features" section. From the Bot Users page, click on the "Add a Bot User" button.

Adding a Bot User

Go ahead and give your Bot User a display name and username. The display name will be what users see what they message you.

Enable the "Always Show My Bot as Online" option. Finish by pressing the green "Add Bot User" button.

Connecting to Slack

To add a new channel to an existing Space, navigate to Settings and select the blue "Add Channel" button under Manage Channels.

On the Rocketbots Platform, select the Slack Logo under the Channel Connection menu. Enter a suitable name for the channel and press the "Continue" button.

Once you have done so, you should be asked for the Client ID, Client Secret, and a Verification Token under Channel Settings.

Channel Settings for Slack

App Credentials

To access your Slack App Credentials, you will have to return the Slack Developer Console. Click on "Basic Information" on the left navigation menu under the Settings section. Scroll down on the Basic Information page to find your App Credentials.

The App Credentials Section

Copy the Client ID, Client Secret, and Verification Token into their respective fields on the Rocketbots Platform. Note that you will have to press the "Show" button to properly view and copy the Client Secret.

These App Credentials allow access to your Slack App. Keep them secret and do not share them publicly!

Once you have copied over your app credentials, press the blue "Continue" button on the Rocketbots Platform.

Connecting to the Platform

Once you are done with the channel settings, the platform should have generated a Webhook URL and a OAuth URL.

Webhook URL and OAuth URL

OAuth & Permissions

On the Slack Developer Console, click "OAuth & Permissions" on the left navigation menu under the Features section.

Press the "Add a new Redirect URL" button under Redirect URLs and paste in the Redirect/OAuth URL from the Rocketbots Platform.

Adding a New Redirect URL

Once you have entered the Redirect URL, press the green "Add" button. When you have added your new Redirect URL, hit the "Save URLs" button to save your changes.

Event Subscriptions

Next, select "Event Subscriptions" on the left navigation menu under Features. On the Event Subscriptions page, turn on the toggle to enable Events.

Event Request URL

Paste the Webhook URL from the Rocketbots Platform onto the Request URL field. After a few moments you should see a green "Verified" with a check mark.

Adding the Event Request URL

Subscribe to Bot Events

From the Event Subscriptions page, scroll down to the "Subscribe to Bot Events" section and press the "Add Bot User Event" button.

This will reveal text field and list of events. You enter terms into this field to search for the event. Here is a list of events you will need to add:

  • im_created

  • message.im

  • message.groups

  • message.channels

Subscribing to Bot User Events

Once you added the necessary Bot Events, click the green "Save Changes" button at the bottom of your screen.

Interactive Components

Select "Interactive Components" on the left navigation menu under Features. On the Interactive Components page, turn on the toggle to enable Interactivity.

Once again, paste the Webhook URL from the Rocketbots Platform onto the Request URL field.

Adding the Interactivity Request URL

When you have added the Request URL, click the green "Save Changes" button at the bottom of your screen.

Go ahead and return to the Rocketbots Platform and press the "Finish" button. Your space is now connected to your Slack App!

Continuing Slack Setup

You have successfully connected your space to a Slack App. However, you will now need to have your Slack Bot join a Slack Team for your team members to use.

Add Your Slack Bot to a Team

In the Slack Developer Console, click on "Manage Distribution" in the left menu under the Settings section.

In the "Share Your App with Your Workspace" section, press the "Add to Slack" button.

Adding your Slack Bot

After pressing the button, a new page should open and ask you to authorize your Slack Bot.

Authorizing your Slack Bot

Press the green "Authorize" button to add your bot to your team.

Any messages sent to your Slack Bot will now be received in your space on the Rocketbots Platform.