Incident management.. all within Slack – /incident
- Request an invite to the Slack Bot Testing Grounds workspace & a copy of the secrets for your
.envfile - Visit https://api.slack.com/apps and select DfE incident bot (test)
- Spin up a ngrok tunnel with
ngrok http 3000and take a copy of the forwarding URL - Navigate to Interactivity & Shortcuts and add the following URL to Request URL:
- Navigate to Slash Commands and add the following URL to the four slash commands:
- Navigate to OAuth & Permissions and add the following URL to Redirect URLS:
- Update your
.envfile with the following URLs:
BASE_URL=https://example.ngrok.ioENV_URL=example.ngrok.io
- Launch your rails server and test the connection in Slack with
/ping
- Go to the Slack apps page and select Create New App.
- Choose From a manifest.
- Copy the following manifest into the text area, replacing
{{ngrok-handle}}with your ngrok handle (the subdomain part of your ngrok URL):
display_information:
name: DfE incident bot (test)
features:
bot_user:
display_name: DfE incident bot (test)
always_online: true
slash_commands:
- command: /ping
url: https://{{ngrok-handle}}.ngrok-free.app/api/slack/command
description: Simple check to verify bot responsiveness
should_escape: false
- command: /incident
url: https://{{ngrok-handle}}.ngrok-free.app/api/slack/command
description: Raise a new incident
usage_hint: "[ open | update | close | help ]"
should_escape: false
oauth_config:
redirect_urls:
- https://{{ngrok-handle}}.ngrok-free.app
scopes:
bot:
- channels:manage
- channels:read
- chat:write
- groups:read
- incoming-webhook
- pins:write
- team:read
- users:read
- commands
settings:
interactivity:
is_enabled: true
request_url: https://{{ngrok-handle}}.ngrok-free.app/api/slack/action
org_deploy_enabled: false
socket_mode_enabled: false
token_rotation_enabled: falseBASE_URL stands for https://your-slackbot-hosted-domain.com hereafter
- Create a new app here
- Navigate to the OAuth & Permissions page and add the following Bot Token Scopes:
channels:managechannels:readchat:writecommandsgroup:readincoming-webhookpins:writeteam:readusers:read
- Activate Interactivity & Shortcuts and add this url:
BASE_URL/api/slack/action - Activate OAuth & Permissions and add
BASE_URLto the Redirect URLs - Activate Slash Commands add two slash commands, using
BASE_URL/api/slack/commandas the Request URL:
/ping/incident- add:[ open | update | close | help ]to the usage hint field
- Grab the information needed for .env file from Basic Information section
- Navigate to the App Home page and toggle Always Show My Bot as Online (according to your reference)
