Adding the Slack Channel¶
To set up the Slack channel on the XO Platform and interact with a VA using a Slack account, you must associate the VA with a Slack app.
The Slack channel integration supports Direct Messaging (DM) and Channel (group) conversations via the Platform. When a VA is added to a channel (group) within the Slack organization space, any member can start a group conversation using @mentions to talk to a specific VA.
The XO Platform offers native support for threaded conversations in the Slack channel. Users can initiate a new thread from any message within a Slack channel or direct message group and continue a conversation with the VA. The XO Platform leverages Slack’s Threads to enable one-on-one conversations without losing the conversation context.
Additionally, the Platform allows developers to configure how the Slack channel integration should handle DM and group conversations. It can automatically create a new thread whenever a user @mentions the virtual assistant in a Slack channel. This configuration flexibility gives developers control over the Threads feature.
Note
To use Slack Threads for your Virtual Assistant deployed on the Slack Channel, add the Bot token Scope chat:write.public
to the existing Slack app under OAuth & Permissions > Scopes > Bot Token Scopes. Learn more.
Prerequisites
To enable this integration, you must already have a Slack account and be a member of a Slack organization space.
Channel Setup Summary
To set up Slack as a channel, the developer should associate the VA with a Slack app, set up a bot user, and enable interactive components for this app. The important steps include:
- Create an App on Slack.
- Set Redirect URL and Scopes.
- Install the App.
- Enable Interactivity.
- Enable Events.
- Enable Interactions from the Message Tab,
- Configure App Credentials.
- Manage Distribution.
- Enable the Channel on the XO Platform.
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 Your Apps section here. If this is your first app, click Create an App. 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 a Slack 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¶
- Click OAuth & Permissions on the left menu and click Add New Redirect URL on the resulting page.
- On the XO Platform, copy the Redirect URL provided in the Configurations section of the Slack channel window and paste it in the Redirect URLs field of the OAuth Tokens & Redirect URLs page.
-
Proceed to Scopes > Bot Token Scopes section.
- Add
incoming-webhook
,chat:write
, andchat:write.public
scopes. - If you would like your users to send attachments to your bot, then select the
files:write
scope.
Note
- To allow users to send attachments to the VA, select the
files:write
scope. - To send Proactive Notifications to users on Slack, select the
users:read
,users:read.email
, andteam:read
scopes.
Step 3: Install the App¶
-
Navigate to OAuth & Permissions > OAuth Tokens & Redirect URLs, and click Install App to Workspace. Choose the required Workspace and complete the process.
-
(Optional) To send Proactive Notifications to your users on Slack, copy the Bot User OAuth Token from the OAuth Tokens for Your Team section and provide it in the Slack Channel Configurations section on the XO Platform.
Step 4: Enable Interactivity¶
- Navigate to Interactivity & Shortcuts and enable Interactivity.
-
On the XO Platform, copy the Webhook URL from the Slack channel’s Configurations tab and enter it in the Request URL field on Slack.
Important
The Webhook URL now includes the streamid in the API request to identify the virtual assistant being accessed. When an incoming request is qualified with this identifier, it helps with traceability, troubleshooting, and remediation at the network level during anomalies like malicious calls or unusual bot activity.
Step 5: Enable Events¶
- Navigate to Event Subscriptions and activate the Enable Events option.
- On the XO Platform, copy the Webhook URL from the Slack channel’s Configurations section and paste it in the Request URL field in the Enable Subscriptions section.
- In the Subscribe to Bot Events section, add
app_mention
, andmessage.im
events. - 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.
- Enable Allow users to send Slash commands and messages from the messages tab. This allows users to directly interact with the app from the Messages section.
Step 7: Configure App Credentials¶
- Navigate to Basic Information and scroll down to the App Credentials section.
- Copy the values for Client ID, Client Secret, and Verification Token fields and provide them in the Configurations section of the Slack Channel on the XO Platform.
Step 8: Manage Distribution¶
To enable the public distribution of your app on Slack, do the following:
- Navigate to Manage Distribution and click Remove Hard Coded Information.
- Select I’ve reviewed and removed any hard-coded information and click Activate Public Distribution..
Step 9: Enable the Channel¶
To enable Slack on the XO Platform, follow the steps below:
- Navigate to Channels > Slack, and click the Configurations tab.
- Copy the below information and use it to define the app properties on Slack:
- Copy and paste the following information from the Slack app:
- Client ID
- Client Secret
- Verification Token
- In the Customize Slack Channel’s Conversations section, select one of the following options to define the conversation behavior of the virtual assistant in a Slack channel when the user \@mentions the VA:
- Continue the conversation with the Virtual Assistant in the channel: This is the default selection. It maintains the current behavior for DM and group messages. However, if a user intentionally starts a thread with the virtual assistant, the conversation will continue within that thread.
- Create a new thread for every user message(\@mentioned to the Virtual assistant) in the channel: For every user message that is \@mentioned to the Virtual assistant in the channel (both DM and Channel conversations), the Platform does the following:
- Creates a new thread and replies to the user message in the thread.
- Treats each conversation thread as a separate session whenever it is created in the channel, maintaining context isolation.
- Treats each conversation thread as a new user conversation whenever it is created for Slack DM.
- All the consecutive interactions between the user and the VA happen in the same thread irrespective of the option you select.
- The existing bots default to the first option, ensuring zero disruptions to current deployments.
- (Optional) Enable Proactive Notifications to send notifications from your Process Apps to your bot users via Slack. Please refer to Step 2 here. Once enabled, select the required Process Apps from the list for your VA, and click Authorize.
Note
The Slack channel is added successfully. 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.