A basic example of how to integrate with Azure Functions.
- Create an app on the Slack developer website. Follow the prompts, selecting the "from scratch" option, rather than the app manifest option.
- Request the bot token scopes required by the demo:
users:read
channels:read
groups:read
im:read
mpim:read
for getting user & conversation info.chat:write
for posting messages.
- Install the app to your workspace.
- Follow the Azure Function instructions to start developing Azure Functions and to host this function app in Azure.
- Set your function's
SlackApiToken
andSlackSigningSecret
application settings in the Azure portal to the values provided in the OAuth & Permissions and Basic Information pages of your Slack app, respectively. - Enable events for your app, and set the request URL to
https://<your function's URL>/event
. Slack will check that your function is up and responding to requests. - Subscribe to the
message.channels
message.groups
message.im
message.mpim
events in order to receive messages. - Add your app to any channels/groups etc. you want it to respond to.
- Say "ping" to get back a "pong".
These URLs aren't used by this example, but may be required for more advanced apps.
- For interactivity & shortcuts:
- Use
https://<your function's URL>/action
for the Interactivity Request URL. - Use
https://<your function's URL>/options
for the Select Menus Options Load URL.
- Use
- For slash commands:
- Use
https://<your function's URL>/command
for the Request URL.
- Use