Skip to content

Sample Slack app to illustrate how incoming webhooks and interactive messages can be used to build a helpdesk integration

License

Notifications You must be signed in to change notification settings

msingh3883/template-actionable-notifications

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 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 window, 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

Sample Slack app to illustrate how incoming webhooks and interactive messages can be used to build a helpdesk integration

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%