Created
May 11, 2020 12:54
-
-
Save troeger/9067f92a5ff7352dc5dd7474f4391e86 to your computer and use it in GitHub Desktop.
Incoming WebHook script for parsing Grafana notifications in Rocket.Chat
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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