Skip to content

Instantly share code, notes, and snippets.

@samuelcouch
Created April 14, 2015 00:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samuelcouch/5195c2bd822dfe53e7ff to your computer and use it in GitHub Desktop.
Save samuelcouch/5195c2bd822dfe53e7ff to your computer and use it in GitHub Desktop.
var request = require('request');
var TOKEN = '<<TOKEN>>';
request.post('https://slack.com/api/chat.postMessage', {
form:{
token: TOKEN,
channel: '#bot',
text: ' ',
attachments: [{
"fallback": "New ticket from Andrea Lee - Ticket #1943: Can't rest my password - https://groove.hq/path/to/ticket/1943",
"pretext": "New ticket from Andrea Lee",
"title": "Ticket #1943: Can't reset my password",
"title_link": "https://groove.hq/path/to/ticket/1943",
"text": "Help! I tried to reset my password but nothing happened!",
"color": "#7CD197"
}]
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment