This document describes how to set up Slack App.
Create Bot
The following are the prerequisite to create a bot:
- botID
- externalURL
Note
Both botID and externalURL will be shared by the SymphonyAI Summit Team.
To create a bot, perform the following steps:
- Take note of your bot's ID.
- To connect to Slack, an HTTPS endpoint is required.
Connecting Bot to Slack
- Go to your apps page. The Your Apps page is displayed.
Figure: Crete an App - Click Create an App button. The Create an App pop-up is displayed.
Figure: Create an app - From scratch - Select From scratch.
Figure: Name app and choose workspace - Provide a name to your Bot under App Name. Remember your App's name, you'll need it in a few minutes. Click Create App. The Basic Information page is displayed:
Figure: Basic Information - Navigate to Settings > Features > Interactivity & Shortcuts. The Interactivity & Shortcuts page is displayed.
Figure: Interactivity & Shortcuts - Turn the Interactivity switch to On.
- Set the request URL to: <EXTERNAL_URL>/api/v1/messaging/webhooks/<YOUR_BOT_ID>/slack/interactive.
- Replace EXTERNAL_URL by the externalUrl shared by the SymphonyAI Summit Team.
- Replace YOUR_BOT_ID by the bot ID shared by the SymphonyAI Summit Team.
- Click Save and save your changes.
- Navigate to Features > OAuth & Permissions and add chat:write under the Scopes > Bot Token Scopes section.
Figure: Scopes - Navigate to Features > App Home. Under the Show Tabs > Messages Tab section, check Allow users to send Slash commands and messages from the messages tab.
Figure: Show Tabs - Navigate to Settings > Basic Information. The Basic Information pop-up is displayed. Click Install to Workspace button under Install your App section.
Figure: Basic Information – Install to Workspace - On the next screen, click the Allow button.
Figure: Allow - Share the values for Client Secret and Signing Secret to SymphonyAI Summit team.
Figure: App Credentials - Back on your Slack app's page, navigate to Features > Event Subscriptions. Turn the Enable Events switch to On.
- Set the Request URL to: <EXTERNAL_URL>/api/v1/messaging/webhooks/<YOUR_BOT_ID>/slack/events.
- Replace EXTERNAL_URL by the externalUrl shared by the SymphonyAI Summit Team.
- Replace YOUR_BOT_ID by the bot ID shared by the SymphonyAI Summit Team.
Under Subscribe to bot event, add message.im and message.channels.
Note:
You can also add other types of messages as per your requirement.
Add the Scopes in the Scopes section: users.profile:read.
Wait for the green Verified message to appear next to Request URL. Click Save to save your changes.
A yellow banner will be displayed at the top of the screen. Click reinstall your app link. On the next screen, click the Allow button.
Quit the Slack app and re-open it.
In Slack, under the Apps section of the sidebar, click the + Add apps button. In the search bar, type the name of your Slack App. Click on your Slack app in the search results. You can now chat with your Digital Agent bot in Slack.