Table of Contents

Slack configuration steps

This document will guide you through the configuration steps needed to enable interactions between the SlackApi and BusinessMate. To use the Slack methods in your workflow, you will need to use an ‘accessToken’ and ‘channel’ name.

How to create an app in Slack

The first thing that needs to be done is to create your Slack application at their official website.
 
Choose ‘Create an app’ or if you already have any other Slack app, you can also go to ‘Your apps’ (https://api.slack.com/).
 
Slack configure

Figure 1. Slack api workspace

Once you’ve created your Slack developer login, go to ‘Create New App’ in the Your Apps section.
 
Slack configure

Figure 2. Your Apps

You will have the option either to create an app from ‘Scratch’ or ‘From an app manifest’.

In this example, we will create an app from scratch. A manifest is a ‘yaml’ file which includes settings of a previous app.

If you’re re-creating an app this option could be useful as it will save you some time.

Slack configure

Figure 3. Create app from scratch

Enter a name for your app and select a workspace if you already have one, or create a new one to be associated to your app. This name and workspace will be used later in your Slack desktop application, for step 2 of this guide.

Slack configure

Figure 4. Choose Name and workspace

App page

Next, you’ll be forwarded to the Basic Information page, where you’ll be setting up your application.

Slack configure

Figure 5. Basic information page

Scroll down until you see ‘Bots’, like shown in the following screen. For this example, we’ll create a bot application, so select that option.

Here you can read about the bot.

From there you will see, that we need to add permissions and scopes for the bot token.

 
Slack configure

Figure 6. Features

OAuth & Permissions

Now, you need to assign scopes to your bot. These settings can be done in the OAuth/Permission part of the site. In the ‘OAuth & Permissions’.

Slack configure

Figure 7. OAuth & Permissions

Scroll down until you find Review Scopes to Add.
 
Slack configure

Figure 8. Assign scope

Scopes are permissions that you can define to your application, depending on your needs. 
 
Press ‘Add an OAuth Scope’ button to start adding.
 
Slack configure

Figure 9. Add an OAuth Scope

For this example, we will select the following scopes.
 
To use the current Slack methods available at BusinessMate, you  need to provide write and read permissions to ‘SendMessage’ and ‘GetAllMessages’ respectively,  to/from a channel.
 
Slack configure

Figure 10. Selected scopes

Install app

After scopes have been added, you can now install your application to workspace.
 
Scroll up until you find ‘Install to Workspace’ button.
 
Slack configure

Figure 11. Install the new permissions

Allow permissions request to finalize.
 
Slack configure

Figure 12. Confirm new persmissions

AccessToken

You can now view and copy your OAuth Token, which will be used in your BusinessMate workflows as ‘accessToken‘.
 
Slack configure

Figure 13. accessToken

Create a channel and add bot

Now that you have you Slack ‘accessToken’ generated, it’s time to head over to your Slack desktop application. You should login to the same workspace selected previously.

We will create a new channel “mychannel” the bot can write to. 

On the left pannel right click on Channels menu and click on “Create a new channel”, then enter the name.

 
slack configure

Figure 14. Create new channel

The last thing that needs to be done is to assign the bot you’ve created to your channel.
 
For this, open your channel message box and start typing ‘@..’. You should find the app name. Select it and send a message.
 
slack configure

Figure 15. Adding bot

You should be all set and ready to start using Slack in your workflows.

slack configure

Figure 16. Bot added