In this post I will create a Slack Channel to expose an Oracle Digital Assistant Skill. It’s not always the case but, for this task, the documentation is really good. I followed the instructions to the letter and all went smoothly. This post documents my experience.
All the info is available here.
Step1: Get a Slack Workspace
I got myself a personal slack workspace on: https://slack.com/create
Step2: Create an App
On https://api.slack.com/apps create a new app.
Step 3: Add OAuth Scopes for the Slack App
In the left navigation of the web console for your Slack app, within the Features section, select OAuth and Permissions.
Step 4: Add the App to the Workspace
Within the OAuth Tokens & Redirect URLs section, click Install App to Your Workspace.
Step 5: Create a Channel in ODA
Before stepping into ODA grab the below information from the Slack App.
Create a channel of type Slack and fill with the previous details.
Now we have a Webhook URL which will be needed to finalize the Slack App configuration.
Step 6: Configure the Webhook URL in the Slack App
This is the step that requires more focus, as it involves going back and forward on some menus and options to configure the Webhook URL. It’s easy to forget something.
- In the left navigation of the web console for your Slack app, select Interactivity & Shortcuts.
- Turn the Interactivity switch ON.
- In both the Request URL and Options Load URL fields, paste the webhook URL that was generated when you created the channel in Digital Assistant .
- Click Save Changes.
- In the left navigation, select OAuth & Permissions.
- In the Redirect URLs field, click Add New Redirect URL.
- Paste the webhook URL, append
/authorizeV2
, and click Add. - Click Save URLs.
- In the left navigation, select App Home.
- In the Your App’s Presence in Slack section, turn on the Always Show My Bot as Online switch.
- In the left navigation, select Event Subscriptions.
- Set the Enable Events switch to ON.
- In the Request URL field, paste the webhook URL. After you enter the URL, a green Verified label should appear next to the Request URL label.
- Expand the Subscribe to bot events section of the page and click Add a bot user.
- Click Add Bot User Event and add the following event:
message.im
- If you plan to make the bot available in group chats, also add the following events:
app_mention
message.mpim
message.channels
- Click Save Changes.
The last step is when we distribute the app to our Slack workplace.
Step 7: Test Your Bot in Slack
Once the App is available in Slack we can add the app and start interacting with the Bot.
Now we can talk with the bot, straight from Slack!!
Final Notes
Slack is one of the most used communication platforms, and it’s perfect for a mix between bots and human interactions. The whole process is quite straightforward. The only thing to have in mind is that every channel offers a different UI experience – that means that some design decisions may be required for the experience optimization.