Sample Slack app to illustrate how incoming webhooks and interactive messages can be used to build a helpdesk integration
:sparkles: 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.
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)Clone this repo to run locally or
npm install
.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)npm start
)ngrok http $PORT
)/interactive-message
(such as https://my-project.glitch.me/interactive-message
)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!