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:readchannels:readgroups:readim:readmpim:readfor getting user & conversation info.chat:writefor 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
SlackApiTokenandSlackSigningSecretapplication 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.channelsmessage.groupsmessage.immessage.mpimevents 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>/actionfor the Interactivity Request URL. - Use
https://<your function's URL>/optionsfor the Select Menus Options Load URL.
- Use
- For slash commands:
- Use
https://<your function's URL>/commandfor the Request URL.
- Use