Slack

Learn to set up a Slack communication channel for your application in your NLX workspace

Step 1: Create a Slack app

In order to get your application up and running with Slack, you'll first 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:

Slack api page for your apps
  • 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

Slack api page for your app

Step 4: Create Slack channel in NLX

  • Navigate to Channels tab of your application

  • Expand Slack option

  • Select + Create channel

  • 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

Optional:

  • 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

  • Click Create channel


Step 5: Post deployment

Once you've set up the Slack channel and deployed your application in NLX, you'll need to provide the URL to your Slack api.

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

  • Under Setup instructions, expand the Slack channel > Click the copy icon to copy the Application 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 Application URL into the Request URL field

Providing the Bot URL in Slack
  • Under Features, click Event Subscriptions from the menu

  • Set the toggle to enable events

  • Paste the Application URL into the Request URL field

Enable Events in Slack
  • Click the down caret to the right of the Subscribe to bot events section

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

  • When finished, click Save Changes

Last updated