To set up Slack as a channel, you must associate the assistant with a Slack app. Adding the Slack channel to your Kore.ai VA allows end-users to interact with it using their Slack accounts.
To complete this procedure, you must already have a Slack account and be a member of a Slack team.
Step 1: Create an App on Slack
- In the XO Platform, select the assistant to which you want to add the Slack Channel.
- Go to Deploy > Channels > Slack, and open the Configuration tab.
- In a new browser tab, Login to the Slack developer portal and go to the Apps section https://api.slack.com/apps. If this is your first app, click Create an App and if you already have some apps, then click Create New App.
- You will now be asked to choose how you’d like to configure your app’s scopes and settings. Select From Scratch.
- On the Create App window, enter the App Name and select a team from the Development Slack Team drop-down list. Use your assistant’s name as the App Name.
- After you enter the required information, click Create App. Slack will now create a new app and you are redirected to the Basic Information section of the new app.
Step 2: Set Redirect URL and Scopes
- Go to the OAuth & Permissions tab and click Add a new Redirect URL. Copy the Redirect URL provided in the Configurations tab of the Slack channel page within the XO Platform and enter in the Redirect URLs field.
- Click Add a new Redirect URL, then click Save URLs.
- Proceed to Scopes > Bot Token Scopes section.
- Add ‘incoming-webhook‘,‘chat:write‘, ‘users:read.email‘, and ‘users:read‘ scopes.
- If you would like your users to send attachments to your bot, then select the ‘files:write’ scope.
- If you would like to send Proactive Notifications to your users on Slack, then select the users:read, users:read.email, team:read scopes.
Step 3: Install the App
- Next, navigate to the OAuth Tokens & Redirect URLs section, and select the Install to Workspace option. Choose the required Workspace and complete the process.
- Optionally, if you would like to send Proactive Notifications to your users on Slack, copy the Bot User OAuth Token from the OAuth Tokens for Your Workspace section and provide it in the Slack Channel Configurations tab within the XO Platform.
Step 4 : Enable Interactivity
- To enable Interactive Components, go to the Interactivity & Shortcuts section and enable Interactivity. Copy the Webhook URL provided in the Configurations tab of this page and enter it in the Request URL field.
- Click Save Changes.
Step 5 : Enable Events
Go to the Event Subscriptions section and activate the Enable Events option.
- Copy the Webhook URL provided in the Configurations tab of Slack Channel page and enter it in the Request URL field.
- In the Subscribe to Bot Events section, add app_mention, message_channels, and message_im events.
- In the Subscribe to Workspace Events section, add message_im event.
- Click Save Changes.
Step 6: Enable Interactions from the Messages tab
Navigate to the App Home section and under Show tabs. enable the Messages Tab and also enable the Allow users to send Slash commands and messages from the messages tab. This is required to allow your users to directly interact with the app from the Messages tab.
Step 7: Configure App Credentials
Go to the Basic Information section and scroll down to the App Credentials section. Capture the values for Client ID, Client Secret, and Verification Token fields and provide them in the Configurations tab of the Slack Channel within the XO Platform.
Step 8: Manage Distribution
If you want to enable the public distribution of your app on Slack, you must proceed with the following steps. Go to the Manage Distribution section and click on Remove Hard Coded Information.
Select the checkbox I’ve reviewed and removed any hard-coded information and click Activate Public Distribution.
Step 9: Enable the Channel
Go to the Configurations tab to review and complete the channel setup. Click Authorize under the app credentials area. Under Enable Channel, select Yes and click on Save to enable the Slack channel.
The Successfully added Slack channel message is displayed at the top of the XO Platform. In Slack, it is optional to submit your app to the Slack App Directory.
After the channel is enabled and all configurations are verified, you can optionally publish
the assistant to make it available for end-users, with the new channel. Learn more about
Publishing your Virtual Assistant.
To learn more about working with Channels within the Kore.ai XO Platform, please see Channel Enablement.