# Set up Workbot for Slack
Watch our 2 minute video guide instead
This page guides you through setting up Workbot in your Slack organization so you can build Workbot recipes and user interactions.
Step 1: If you will use an NLU provider for the Workbot conversational interface, connect to the NLU provider. Otherwise, skip this step.
Step 2: If you are building an Enterprise Workbot, configure a custom OAuth profile. Otherwise, skip this step.
Step 3: Create a Workbot for Slack connection
Step 4: Invite Workbot to channels
# Before you start
- Ensure you have permission to connect. This depends on your organization's Slack workspace setting; some organizations allow any member of a Slack workspace to install a third-party app, others limit this permission to admins only.
- We recommend using an integration user account to configure the connection, rather than an account that is used by a human.
# Permissions
Token type | Scope | Reason |
---|---|---|
User | users:read | View information about the user's identity. |
users:read.email | Get user info by email. | |
Bot | app_mentions:read | Listen for bot mentions in conversations which the bot is involved in. |
channels:read | Retrieves list of public conversations. | |
chat:write | Create/update public conversations. | |
files:read | Retrieves list of private conversations. | |
files:write | Create/update private conversations. | |
groups:read | Retrieves list of direct message conversations. | |
im:history | Create/update direct message conversations. | |
im:write | Create/update multi-party group conversations. | |
mpim:read | Retrieves list of multi-party group conversations. | |
users:read | Get user info. | |
users:read.email | Get user info by email. |
# 1. Connect to the NLU provider
Workbot for Slack supports Google DialogFlow and Amazon Lex. If you would like to use one of these NLU providers, you must connect the NLU provider to Workato before you connect with Workbot for Slack.
To connect to your NLU provider, go to App Connections and select Create a new connection. Search for your NLU provider.
# 2. Configure a custom OAuth profile
With a custom OAuth profile, you can customize the Workbot for Slack identity, including the branding (bot name, bot logo, and background color) and permissions. To configure a new custom OAuth profile, go to Tools > Custom OAuth profiles and click Create custom profile.
In the Application field, select Workbot for Slack. Click Create new app.
This will open your Slack apps (opens new window) in a new tab.
Select Create new app from the Slack window.
Select From scratch. This allows you to define the scope and permission according to your use case.
Enter a descriptive name for your app and choose which Slack workspace this app belongs to. Click Create App.
You will be redirected to your newly created Slack app's Basic Information page.
Scroll to the App credentials section and save the following information.
- Client ID
- Client secret
- Verification token
Return to Workato setup. Provide the app credentials information from your Slack app. Click Save when done.
Application token field
Leave this field empty. The Application Token is a configuration for Org-level Apps.
Return to your Slack settings. Select OAuth & Permission on the left-side navigation.
Select Add a new Redirect URL
. Copy the callback URL into your Slack settings. Click Save URLs.
https://www.workato.com/oauth/callback
This doesn’t seem like a proper link
If you get an error saying 'This doesn’t seem like a proper link' please check to make sure there are no extra spaces at the start/end of the link.
Still on OAuth & Permissions*. Navigate to Scopes, select the following Bot Token Scopes:
- app_mentions:read
- chat:write
- channels:read
- commands
- files:read
- files:write
- groups:read
- im:history
- im:write
- mpim:read
- users:read
- users:read.email
Still on OAuth & Permissions. Navigate to Scopes, select the following User Token Scopes:
- users:read
- users:read.email
Select App home from the left-side navigation.
- Provide the Display name and Default username.
- Select
ON
to Always Show My Bot as Online
Still on App home. Navigate to Show tabs > Messages Tab.
Ensure that the option to allow users to send message
is selected. This allows users to send messages to the Slackbot.
Select Event Subscriptions from the left-side navigation.
- Select
ON
- Provide the Request URL provided in your Workato configuration. A sample URl is provided below
https://app.workato.com/slack_webhooks/event?coak_id=9690
Still on Event Subscriptions. Navigate to the Subscribe to Bot Events subsection. Add the following Bot User Events:
- app_mention
- file_shared
- message.im
- app_home_opened
Select Save Changes at the bottom on the page.
Select Interactivity & Shortcuts from the left-side navigation.
- Select
ON
- Provide the Request URL and Options Load URL provided in your Workato configuration. A sample URl is provided below
https://app.workato.com/slack_webhooks/event?coak_id=9690
Select Save Changes at the bottom on the page.
Lastly, it is time to install your Slack app into your workspace!
Select Install App from the left-side navigation.
- Select Install to Workspace.
- Click Allow when prompted.
# 3. Create a Workbot for Slack connection
Connecting a Workbot for Slack connection will add Workbot to your Slack team. To create a new Workbot for Slack connection, go to App Connections and click Create a new connection. Search for Workbot for Slack to begin.
Workbot for Slack connection fields | ||
---|---|---|
Application | Workbot for Slack | |
Connection name | Choose an appropriate name for this connection | |
NLU provider | You can optionally select the DialogFlow or Amazon Lex NLU. You must connect to the NLU provider for it to appear in the dropdown list. | |
Advanced | Slash commands verification tokens | Used for invoking legacy Custom Integration slash commands. Each slash command has a token. Separate tokens with commas to support multiple slash commands. Learn more. |
Custom help | Provide simple text help OR rich help using a JSON document corresponding to Slack message. You can build a rich help message using the Slack message builder. | |
Is this a Classic Slack app? | Select Yes if you have not migrated your app yet. | |
Custom OAuth profile | Custom OAuth profiles allow your Slack apps to leverage the Workato Slack connector under the hood. When selected, all requests to the app will use the profile specified. Learn more. |
After you install Workbot into your Slack team, Workbot detects the latest app connections in your Workato account and automatically connects to them.
You can interact with Workbot via direct messages after adding Workbot to your Slack organization. Direct messages with Workbot are not visible to anyone but you.
To enable other users to interact with Workbot or to allow Workbot to post notifications, you must invite it to specific channels. Proceed to the next section.
# 4. Invite Workbot to channels
Conversations with Workbot in a channel are visible to all team members in that channel.
To invite Workbot to a channel, do one of the following:
- Mention Workbot via
@workbot
- Use the Invite new members to join menu option in the channel details
After you add Workbot to a channel, use @workbot
to begin an interaction.
When you talk to Workbot via direct message, you do not need to use @workbot.
# Next
Now that you have set up Workbot in Slack, proceed to build your first Workbot.
Last updated: 10/4/2023, 6:53:59 PM