When a helpdesk ticket is created in a 3rd party system, send an actionable notification in Slack that allows the user to claim the ticket or apply a label.
- Create an app at api.slack.com/apps
- Navigate to the OAuth & Permissions page and add the following scopes:
users:readchat:write:bot
- Activate Incoming Webhooks from the Incoming Webhooks page
- Click 'Add New Webhook to Team', install the app and select a channel
- Get the code
- Either clone this repo and run
npm install - Or visit https://glitch.com/edit/#!/remix/slack-actionable-notification-blueprint
- Either clone this repo and run
- Set the following environment variables to
.env(see.env.sample):SLACK_TOKEN: Your app'sxoxp-token (available on the Install App page)PORT: The port that you want to run the web server onSLACK_WEBHOOK: The webhook URL that you copied off the Incoming Webhook pageSLACK_VERIFICATION_TOKEN: Your app's Verification Token (available on the Basic Information page)
- If you're running the app locally:
- Start the app (
npm start) - In another windown, start ngrok on the same port as your webserver (
ngrok http $PORT)
- Start the app (
- Go back to the app settings and click on Interactive Messages.
- Set the Request URL to your ngrok URL + /interactive-message
- Post the mock ticket JSON to the /incoming endpoint
curl -X POST -H 'Content-type: application/json' --data "`cat ./ticket.json`" <ngrok URL + /incoming>
