Training
Certification
Microsoft Certified: Power Platform Developer Associate - Certifications
Demonstrate how to simplify, automate, and transform business tasks and processes using Microsoft Power Platform Developer.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
APPLIES TO: SDK v4
You can configure your bot to communicate with people through a Slack app. This article describes how to create a Slack app using Slack, connect your bot to your Slack app in Azure, and test your bot in Slack.
This article shows how to add a Slack channel to your bot in the Azure portal. For information on how to use a custom channel adapter, see Additional information.
You first create an application in Slack, which generates the information you need to configure the Slack channel for your bot in Azure.
Once the app is created, add a redirect URL to your app.
Select OAuth & Permissions.
In the resulting pane, under Redirect URLs, select Add a new Redirect URL.
In the input box, enter one of the following redirect URLs and select Add.
https://slack.botframework.com
.Region | Redirect URL |
---|---|
Europe | https://europe.slack.botframework.com |
India | https://india.slack.botframework.com |
Select Save URLs.
After you add the redirect URL, subscribe your app to bot events to have Slack notify your bot of user activities at the URL you specify. Subscribe to events based on the features your bot will use in Slack.
Select Event Subscriptions.
In the resulting pane, toggle Enable Events to On.
For Request URL, enter one of the following request URLs, where {bot-name}
is the display name for your Azure Bot resource, without the braces.
https://slack.botframework.com/api/Events/{bot-name}
.Region | Request URL |
---|---|
Europe | https://europe.slack.botframework.com/api/Events/{bot-name} |
India | https://india.slack.botframework.com/api/Events/{bot-name} |
Under Subscribe to bot events, select Add Bot User Event, then subscribe to events. For example:
member_joined_channel
member_left_channel
message.channels
message.groups
message.im
message.mpim
Select Save Changes.
After you subscribe to bot events, enable users to message your bot.
Optionally, enable interactive messages.
Select Interactivity & Shortcuts.
For Request URL:
https://slack.botframework.com/api/Actions
.Region | Request URL |
---|---|
Europe | https://europe.slack.botframework.com/Actions |
India | https://india.slack.botframework.com/Actions |
Select Save changes.
You'll need the following information to add the Slack channel to your bot. Always copy and store app credentials in a safe place.
To complete this step, you'll need your Slack application credentials from the previous step.
Open the Azure portal.
Open the Azure Bot resource blade for your bot.
Open Channels and select Slack.
In Slack Channel Configuration, enter the information you copied in the previous steps.
Select Apply.
You're redirected to Slack to finish installing your Slack app.
Your bot's now configured to communicate with users in Slack. Users in the workspace can now interact with your bot via the Slack app.
Note
As of June 2020 Slack channel supports Slack V2 permission scopes, which allow the bot to specify its capabilities and permissions in a more granular way. All newly configured Slack channels will use the V2 scopes. To switch your bot to the V2 scopes, delete and recreate the Slack channel configuration in the Azure portal Channels blade.
For more information about Slack support for bots, see the Slack API documentation:
As well as the channel available in the Azure AI Bot Service to connect your bot with Slack, the Bot Builder Community repos define a custom channel adapter for Slack.
Training
Certification
Microsoft Certified: Power Platform Developer Associate - Certifications
Demonstrate how to simplify, automate, and transform business tasks and processes using Microsoft Power Platform Developer.