Skip to content

Instantly share code, notes, and snippets.

@troeger
Created May 11, 2020 12:54
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 troeger/9067f92a5ff7352dc5dd7474f4391e86 to your computer and use it in GitHub Desktop.
Save troeger/9067f92a5ff7352dc5dd7474f4391e86 to your computer and use it in GitHub Desktop.
Incoming WebHook script for parsing Grafana notifications in Rocket.Chat
class Script {
process_incoming_request({ request }) {
console.log(request.content);
return {
content:{
"text": request.content.message,
"attachments": [{
"author_name": "Grafana",
"image_url": request.content.imageUrl,
"title": request.content.title
}]
}
};
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment