To deploy a webhook based bot to your Slack workspace you will first have to go to channels, select Slack and then click Connect.



Name your channel in a way that makes it easier for you and your team to remember what the channel is for and then select the option "WebHook Based Bot"




At this point you will have to log into your Slack workspace and configure a Slack Application so that you can create the webhook that the bot will use to connect to your Slack Workspace.

To get started, go to https://api.slack.com/apps and click Create New App.



Give a name to your App, select the workspace where you would like the App (your bot) to be connected and click Create App.



Congratulations, your app has been created and is now time to configure it the way you want. Let's start from the incoming webhook which is the weebhook url where BotSupply will send messages to be displayed in Slack.

To configure the incoming webhook, click on Incoming webhook.




Enable the incoming webhook functionality by toggling on the switch and then click on Add New Webhook to workspace to create your webhook.




Before creating the webhook, Slack will ask you to authorize the application to access your Workplace and to specify a channel where the bot should be deployed. Select a channel from the dropdown and then click Allow.



Success, you have created your incoming webhook. Copy it and then past it in the channel configuration page in BotSupply and click Save.



The channel will be created on BotSupply alongside a callback url that we will use to receive the messages that your users are sending from Slack. Copy the URL and go back to the Slack App configuration page.



Go to Event Subscriptions and enable them by toggling the switch.




Paste the URL in the "Request URL" field and wait for Slack to verify it.



Once the URL is verified, click on Subscribe to bot events, and configure the events that you would like your bot to subscribe to and then click Save.

Note: As a minimum, the bot should at least be subscribed to "app_mention".



Slack will save the configuration and it will ask you to reinstall the app in your workplace. Click re-install your app, you will be asked to chose a channel again. Select a channel and click Allow.



At this point, Slack will generate a new webhook for you. Go to to "incoming webhooks" and copy the new webhook.


Note: the new webhook is always the one at the bottom.




Copy the webhook, and past it back into the Slack Channel configuration in BotSupply and click Update.



Depending on wether you configured a test or a live channel, click save or publish to make your bot available in the channel and congrats...you'r bot is now accessible from slack.

To use your bot, go over to slack and open the channel that you picked during the configuration process and write a message to the bot by @mentioning the bot name and writing a message in the same line.



The bot will reply as expected:




NOTE: if your bot uses quick replies to navigate the user between blocks like in the Tesla Bot example above, you will have to enable interactivity in the Slack settings before the QRs starts working.

To enable interactivity, go to interactivity and shortcuts and click the toggle to enable interactivity and past the callback URL that you can find in the Slack channel configuration page of BotSupply in the request URL field.


Now all your quick replies will work on Slack