To connect a bot created on The Bot Platform to Slack, you need to create a Slack app first, then set it up as a bot.
Create an app
Sign in to your Slack workspace.
Head over to https://api.slack.com/apps:
Click ‘Create New App’, then ‘From Scratch’.
Enter a name for your bot and select The Bot Platform as the workplace.
Protip: use the same name you're going to use for the bot you'll create on The Bot Platform so that you will always know what bot to edit in our powerful CMS!Click ‘Create App’.
Add scopes
Navigate to the ‘OAuth & Permissions’ page.
Scroll until you see the ‘Scopes’ section.
Click ‘Add an Oauth Scope’, under 'Bot Token Scopes' then select the following:
chat:write
im:history
im:write
users:read
users:read.email
channels:read
Set up permissions
As you are in the ‘OAuth & Permissions’ page:
Scroll until you see the ‘OAuth Tokens for Your Workspace’ section.
Click ‘Install to Workspace’.
Then ‘Allow’ the bot permission to access The Bot Platform workspace.
You’ll then see a ‘Bot User OAuth Token’, copy it and paste it somewhere safe, e.g. a text file you own. You're going to need to enter it in our platform at the end of this process.
Enable Messages
Navigate to the ‘App Home’ page.
Scroll until you see the ‘Show Tabs’ section.
Enable the ‘Messages Tab’ toggle.
Tick the ‘Allow users to send Slash commands and messages from the messages tab’ box.
Enable webhook
Navigate to the ‘Event Subscriptions’ page.
Click the ‘Enable Events’ toggle.
Enter the URL below into the ‘Request URL’ box and hit enter.
You should have a green verified tick.
Subscribe to Bot Events
As you are in the ‘Event Subscriptions’ page:
Scroll until you see the ‘Subscribe to bot events’ section.
Click ‘Add Bot User Event’ and select for ‘message.im’ and 'app_home_opened'.
Click the green ‘Save Changes’ button.
Interactivity & Shortcuts
Navigate to the ‘Interactivity & Shortcuts’ page.
Click the ‘**Interactivity’ toggle.
In the ‘Request URL’ box, enter the following URL:
Click ‘Save Changes’.
Bot Credentials
Navigate to the ‘Basic Information’ page.
Scroll until you see the ‘App Credentials’ section.
Copy the following data:
App ID
Signing Secret
You should also have the Bot OAuth Token from the ‘Slack Bot - Permissions’ step.
Once you have App ID, Signing Secret, and Bot OAuth Token you'll be ready to connect your bot on The Bot Platform to your Slack app—The Bot Platform will ask for those three in the connection process.
Change your Slack app's details
If you want to edit your bot's info:
Navigate to the ‘Basic Information’ page.
Scroll until you see the ‘Display Information’ section.
Edit App name, Short description, App icon & Preview, Background colour, and/or Long description, and Save changes.