Git Product home page Git Product logo

template-actionable-notifications's Introduction

Actionable notifications template

โœจ Updated January 2020: As we have introduced some new features, this tutorial and the code samples have been updated!

Read diff.md for more info!


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.

Screenshot of template application

Setup

Create a Slack app

  1. Create an app at api.slack.com/apps
  2. Activate Incoming Webhooks from the Features > Incoming Webhooks then click 'Add New Webhook to Workspace', install the app and select a channel
  3. Navigate to the OAuth & Permissions page and add the following bot scopes:
    • incoming-webhook (This should be pre-selected)
    • chat:write (to send messages)
    • im:write (to open a DM channel between your bot and a user)

Run the app

Clone this repo to 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 xoxb- token (available on the OAuth & Permissions)
    • SLACK_WEBHOOK: The webhook URL that you copied off the Incoming Webhook
    • SLACK_SIGNING_SECRET: Your app's Signing secret (available on the Basic Information)
  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 Components

  1. Go back to the app settings and click on Interactive Components.
  2. Set the Request URL to your ngrok URL (or Glitch URL) + /interactive-message (such as https://my-project.glitch.me/interactive-message)
  3. Save

Send a mock new ticket notification

Post the mock ticket JSON to the /incoming endpoint:

curl -X POST -H 'Content-type: application/json' --data "`cat ./ticket.json`" <Your app server URL + /incoming>

Example: curl -X POST -H 'Content-type: application/json' --data "`cat ./ticket.json`" https://slack-actionable-notification-blueprint.glitch.me/incoming

You need the ticket.json file in the same directory where you are sending the curl command!

template-actionable-notifications's People

Contributors

aoberoi avatar colmdoyle avatar girliemac avatar pichsenmeister avatar sachinr avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.