Skip to content

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:

  1. Create an App on Slack.
  2. Set Redirect URL and Scopes.
  3. Install the App.
  4. Enable Interactivity.
  5. Enable Events.
  6. Enable Interactions from the Message Tab,
  7. Configure App Credentials.
  8. Manage Distribution.
  9. Enable the Channel on the XO Platform.

Step 1: Create an App on Slack

  1. In the XO Platform, select the assistant to which you want to add the Slack Channel.
  2. Go to Deploy > Channels > Slack, and open the Configuration tab.
  3. 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. create an app

  4. You will now be asked to choose how you’d like to configure your app’s scopes and settings. Select From Scratch.

  5. 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. create a slack app

  6. 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

  1. Click OAuth & Permissions on the left menu and click Add New Redirect URL on the resulting page.
  2. 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.
  3. Click Add, and then click Save URLs. set redirect url

  4. Proceed to Scopes > Bot Token Scopes section.

  5. Add incoming-webhook, chat:write, and chat:write.public scopes.
  6. 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, and team:read scopes.

bot token scopes

Step 3: Install the App

  1. Navigate to OAuth & Permissions > OAuth Tokens & Redirect URLs, and click Install App to Workspace. Choose the required Workspace and complete the process. install app to workspace

  2. (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. oauth tokens for workspace

Step 4: Enable Interactivity

  1. Navigate to Interactivity & Shortcuts and enable Interactivity.
  2. 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.

  1. Click Save Changes.
  2. interactivity and shortcuts

Step 5: Enable Events

  1. Navigate to Event Subscriptions and activate the Enable Events option.
  2. 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.
  3. In the Subscribe to Bot Events section, add app_mention, and message.im events.
  4. Click Save Changes.

events subscriptions

Step 6: Enable Interactions from the Messages tab

  1. Navigate to the App Home section and under Show tabs. enable the Messages Tab.
  2. 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. enable interactions

Step 7: Configure App Credentials

  1. Navigate to Basic Information and scroll down to the App Credentials section.
  2. 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. app credentials configuration

Step 8: Manage Distribution

To enable the public distribution of your app on Slack, do the following:

  1. Navigate to Manage Distribution and click Remove Hard Coded Information.
  2. Select I’ve reviewed and removed any hard-coded information and click Activate Public Distribution..

manage distribution

Step 9: Enable the Channel

To enable Slack on the XO Platform, follow the steps below:

  1. Navigate to Channels > Slack, and click the Configurations tab.
  2. Copy the below information and use it to define the app properties on Slack:
  • Bot Name
  • Redirect URL
  • Webhook URL
  • slack configuration
  1. Copy and paste the following information from the Slack app:
  • Client ID
  • Client Secret
  • Verification Token
  1. Click Authorize.
  2. authorize client credentials
  1. 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.
      customize slack conversation

    Note

    • 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.

  2. (Optional) Enable Proactive Notifications to send notifications from your Process Apps to your bot users via Slack. Please refer to Step 2 here. proactive notfications
  3. Once enabled, select the required Process Apps from the list for your VA, and click Authorize.
  1. Under Enable Channel, select Yes and click Save to enable the Slack channel. enable slack channel

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.