Skip to content

sachinr/actionable-notification-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Actionable notifications template

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.

image

Setup

Create a Slack app

  1. Create an app at api.slack.com/apps
  2. Navigate to the OAuth & Permissions page and add the following scopes:
    • users:read
    • chat:write:bot
  3. Activate Incoming Webhooks from the Incoming Webhooks page
  4. Click 'Add New Webhook to Team', install the app and select a channel

Run locally or Remix on Glitch

  1. Get the code
  2. Set the following environment variables to .env (see .env.sample):
    • SLACK_TOKEN: Your app's xoxp- token (available on the Install App page)
    • PORT: The port that you want to run the web server on
    • SLACK_WEBHOOK: The webhook URL that you copied off the Incoming Webhook page
    • SLACK_VERIFICATION_TOKEN: Your app's Verification Token (available on the Basic Information page)
  3. If you're running the app locally:
    1. Start the app (npm start)
    2. In another windown, start ngrok on the same port as your webserver (ngrok http $PORT)

Enable Interactive Messages

  1. Go back to the app settings and click on Interactive Messages.
  2. Set the Request URL to your ngrok URL + /interactive-message

Send a mock new ticket notification

  1. Post the mock ticket JSON to the /incoming endpoint
    • curl -X POST -H 'Content-type: application/json' --data "`cat ./ticket.json`" <ngrok URL + /incoming>

About

Slack app template to create an actionable notification app

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published