diff --git a/demo/env.example b/demo/env.example index b8aa9d7b..4175c8a3 100644 --- a/demo/env.example +++ b/demo/env.example @@ -1,6 +1,7 @@ SLACK_TOKEN= SLACK_SIGNING_SECRET= INCIDENT_CHANNEL_NAME=incidents -INCIDENT_BOT_NAME=incident +INCIDENT_BOT_NAME=incident # This bot name is all lowercase. If the bot name `Response` is specified, this name will be `response`. +INCIDENT_REPORT_CHANNEL_NAME=incidents DJANGO_SETTINGS_MODULE=demo.settings.dev diff --git a/demo/slack-app-manifest.yaml b/demo/slack-app-manifest.yaml new file mode 100644 index 00000000..907cb387 --- /dev/null +++ b/demo/slack-app-manifest.yaml @@ -0,0 +1,46 @@ +_metadata: + major_version: 1 + minor_version: 1 +display_information: + name: Response +features: + bot_user: + display_name: Response + always_online: true + slash_commands: + - command: /incident + url: https://*****.ngrok.io/slack/slash_command # docker logs ngrok + description: Trigger an incident + usage_hint: What's the problem? + should_escape: false +oauth_config: + scopes: + bot: + - app_mentions:read + - channels:history + - channels:join + - channels:manage + - channels:read + - chat:write + - chat:write.public + - reactions:write + - users:read + - users:read.email + - commands + - pins:read +settings: + event_subscriptions: + request_url: + bot_events: + - app_mention + - channel_rename + - message.channels + - pin_added + - pin_removed + interactivity: + is_enabled: true + request_url: https://*****.ngrok.io/slack/action + org_deploy_enabled: false + socket_mode_enabled: false + token_rotation_enabled: false + diff --git a/docs/slack_app_config.md b/docs/slack_app_config.md index 2891cb7b..0c618afc 100644 --- a/docs/slack_app_config.md +++ b/docs/slack_app_config.md @@ -16,6 +16,14 @@ The steps here outline how to complete the Slack side setup for Response. The a **Important** You need to have the server running and available to setup events, as Slack sends a challenge request to this address and expects a specific response. +For example, Google Apps Script. +```js +function doPost(e){ + var params = JSON.parse(e.postData.getDataAsString()); + return ContentService.createTextOutput(params.challenge); +} +``` + In the Event Subscriptions page we need to configure the following: - Toggle `Enable Events` to On @@ -33,6 +41,10 @@ In the Event Subscriptions page we need to configure the following: - In the Interactive Components page, enable and set the URL to `https:///slack/action`. +## Example + +[Example of a Slack App Manifest](../demo/slack-app-manifest.yaml) + ## Reinstall App -With these changes made, you'll need to reinstall the app to your workspace. There should be a bar at the top with a link, but if not you can find the resinstall link in the OAuth & Permissions page. \ No newline at end of file +With these changes made, you'll need to reinstall the app to your workspace. There should be a bar at the top with a link, but if not you can find the resinstall link in the OAuth & Permissions page. diff --git a/docs/slack_app_create.md b/docs/slack_app_create.md index a0438706..8ca5edf0 100644 --- a/docs/slack_app_create.md +++ b/docs/slack_app_create.md @@ -16,5 +16,9 @@ - `reactions:write` - `users:read` - `users:read.email` + - `commands` + - `pins:read` -- At the top of the page, the `Install App to Workspace` button is now available. Click it! \ No newline at end of file +- At the top of the page, the `Install App to Workspace` button is now available. Click it! + +[Example of a Slack App Manifest](../demo/slack-app-manifest.yaml)