Skip to content

A Slack app used for incident management at Department for Education Digital

License

Notifications You must be signed in to change notification settings

DFE-Digital/slack-incident-bot

Repository files navigation

DfE Incident Bot 🤖

Incident management.. all within Slack/incident

Local Setup

  1. Request an invite to the Slack Bot Testing Grounds workspace & a copy of the secrets for your .env file
  2. Visit https://api.slack.com/apps and select DfE incident bot (test)
  3. Spin up a ngrok tunnel with ngrok http 3000 and take a copy of the forwarding URL
  4. Navigate to Interactivity & Shortcuts and add the following URL to Request URL:
  1. Navigate to Slash Commands and add the following URL to the four slash commands:
  1. Navigate to OAuth & Permissions and add the following URL to Redirect URLS:
  1. Update your .env file with the following URLs:
  • BASE_URL=https://example.ngrok.io
  • ENV_URL=example.ngrok.io
  1. Launch your rails server and test the connection in Slack with /ping

New App Setup

BASE_URL stands for https://your-slackbot-hosted-domain.com hereafter

  1. Create a new app here
  2. Navigate to the OAuth & Permissions page and add the following Bot Token Scopes:
  • channels:manage
  • channels:read
  • chat:write
  • commands
  • group:read
  • incoming-webhook
  • pins:write
  • team:read
  • users:read
  1. Activate Interactivity & Shortcuts and add this url: BASE_URL/api/slack/action
  2. Activate OAuth & Permissions and add BASE_URL to the Redirect URLs
  3. Activate Slash Commands add two slash commands, using BASE_URL/api/slack/command as the Request URL:
  • /ping
  • /incident - add: [ open | update | close | help ] to the usage hint field
  1. Grab the information needed for .env file from Basic Information section
  2. Navigate to the App Home page and toggle Always Show My Bot as Online (according to your reference)