Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update demo #256

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion demo/env.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
SLACK_TOKEN=<SET_THIS>
SLACK_SIGNING_SECRET=<SET_THIS>
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
46 changes: 46 additions & 0 deletions demo/slack-app-manifest.yaml
Original file line number Diff line number Diff line change
@@ -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: <Google Apps Script URL for respond the Slack Challenge Request>
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

14 changes: 13 additions & 1 deletion docs/slack_app_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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://<public-url>/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.
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.
6 changes: 5 additions & 1 deletion docs/slack_app_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -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!
- 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)