Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
var request = require('request');
if(data) {
var slackUrl = "<YOUR SLACK URL>";
var text = {
"text": "Something happened!!\n<" + data.context.portalLink + "|Check it out>"
};
var requestData = {
url: slackUrl,
method: "POST",
json: true,
headers: {
"content-type": "application/json",
},
body: text
};
request(requestData);
context.res = {
status: 200
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment