Learn to set up a Slack communication channel for your bot in NLX's Dialog Studio

Step 1: Create a Slack app

In order to get your bot up and running with Slack, you'll start by creating a Slack app:

  • Under Customize your workspace, click the Create an app button

  • Select create From scratch

  • Enter a name under App Name

  • Select a workspace for developing your app

  • Click Create App

This brings up the Slack api page for Your Apps with your newly-created app selected in the dropdown of the upper left:

  • Next, define what your bot can access by Click OAuth & Permissions under the Features in the menu bar

  • Scroll to the Scopes section and under Bot Token Scopes, click Add an OAuth Scope button

  • Select the Chat:write permissions scope

Step 2: Generate Bot user access token

  • Under Features in the Slack account menu, select OAuth & Permissions.

  • Under OAuth Tokens for Your Workspace, click the Install to Workspace button

  • Click Allow

An OAuth token is automatically generated for your workspace and the value now displays in the Bot User OAuth Token.

Step 3: Access Signing secret

  • Under Settings in the menu, select Basic Information and look under App Credentials

The Signing Secret value is hidden by default. Click Show to reveal the value.

Step 4: Create Slack channel

Be sure to create a Slack app first before proceeding with setup in Dialog Studio.

In Dialog Studio, create a Slack channel for your bot under the bot's Channels tab:

  • Expand Slack option

  • Select + Create channel link

  • Enter Bot user access token found under the OAuth & Permissions page of your Slack app

  • Enter Signing Secret found on the Basic Information page of your Slack app

  • Click Create channel

Step 5: Post deployment

Once you've set up the Slack channel and deployed your bot in Dialog Studio, you'll need to provide the bot's URL to your Slack api.

  • From the Deployments tab for your bot, click the Details link for the deployment:

  • Under Setup instructions, expand the Slack channel > Click the copy icon to copy the Bot URL

  • Go to the Slack api page (if you have more than one app in Slack, make sure the correct app is selected in the dropdown on the upper-left of the page)

  • Under Features, select Interactivity & Shortcuts from the menu

  • Set the toggle to enable interactivity

  • Paste the Bot URL into the Request URL field

  • Under Features, click Event Subscriptions from the menu

  • Set the toggle to enable events

  • Paste the Bot URL into the Request URL field

  • Click the down caret to the right of the Subscribe to bot events section

  • Click the Add Bot User Event button, then select from the list to add the appropriate events

  • When finished, click Save Changes

Optional Slack fields

The following is optional to setting up your Slack channel:

  • Language: Allows you to select the language used for this channel

  • Token endpoint: For retrieving a Slack access token for a given Slack conversation

  • Token endpoint API key: The API key that protects the Token endpoint

Need context on the other fields? See Bots: Channels

Last updated