Last active
June 2, 2026 10:38
-
-
Save soham2008xyz/fde3e0f9add132841922e5af710b9ee5 to your computer and use it in GitHub Desktop.
Sentry alerts configuration template for Microsoft Teams
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
| { | |
| "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", | |
| "type": "AdaptiveCard", | |
| "version": "1.5", | |
| "body": [ | |
| { | |
| "type": "Container", | |
| "bleed": true, | |
| "style": "@{if(or(equals(toLower(coalesce(triggerBody()?['data']?['issue']?['level'], triggerBody()?['data']?['event']?['level'], triggerBody()?['level'], 'error')), 'fatal'), equals(toLower(coalesce(triggerBody()?['data']?['issue']?['level'], triggerBody()?['data']?['event']?['level'], triggerBody()?['level'], 'error')), 'error')), 'attention', if(equals(toLower(coalesce(triggerBody()?['data']?['issue']?['level'], triggerBody()?['data']?['event']?['level'], triggerBody()?['level'], 'error')), 'warning'), 'warning', 'accent'))}", | |
| "items": [ | |
| { | |
| "type": "TextBlock", | |
| "text": "@{if(equals(toLower(coalesce(triggerBody()?['data']?['issue']?['level'], triggerBody()?['data']?['event']?['level'], triggerBody()?['level'], 'error')), 'fatal'), '💀', if(equals(toLower(coalesce(triggerBody()?['data']?['issue']?['level'], triggerBody()?['data']?['event']?['level'], triggerBody()?['level'], 'error')), 'error'), '🚨', if(equals(toLower(coalesce(triggerBody()?['data']?['issue']?['level'], triggerBody()?['data']?['event']?['level'], triggerBody()?['level'], 'error')), 'warning'), '⚠️', 'ℹ️')))} Sentry Alert — @{toUpper(coalesce(triggerBody()?['data']?['issue']?['level'], triggerBody()?['data']?['event']?['level'], triggerBody()?['level'], 'error'))} · @{coalesce(triggerBody()?['data']?['issue']?['project']?['slug'], if(not(empty(triggerBody()?['data']?['event']?['url'])), split(triggerBody()?['data']?['event']?['url'], '/')[7], null), triggerBody()?['project_name'], 'unknown-project')}", | |
| "weight": "Bolder", | |
| "size": "Medium", | |
| "wrap": true | |
| } | |
| ] | |
| }, | |
| { | |
| "type": "TextBlock", | |
| "text": "@{replace(replace(replace(replace(coalesce(triggerBody()?['data']?['issue']?['title'], triggerBody()?['data']?['event']?['occurrence']?['issueTitle'], if(and(not(empty(triggerBody()?['data']?['event']?['title'])), not(equals(triggerBody()?['data']?['event']?['title'], '<untitled>'))), triggerBody()?['data']?['event']?['title'], null), triggerBody()?['data']?['event']?['message'], triggerBody()?['event']?['title'], triggerBody()?['message'], 'Unknown error'), decodeUriComponent('%22'), ''''), decodeUriComponent('%5C'), '/'), decodeUriComponent('%0A'), ' '), decodeUriComponent('%0D'), ' ')}", | |
| "weight": "Bolder", | |
| "size": "Large", | |
| "wrap": true, | |
| "spacing": "Medium" | |
| }, | |
| { | |
| "type": "FactSet", | |
| "spacing": "Medium", | |
| "separator": true, | |
| "facts": [ | |
| { | |
| "title": "Status", | |
| "value": "@{coalesce(triggerBody()?['data']?['issue']?['substatus'], triggerBody()?['data']?['issue']?['status'], 'N/A')}" | |
| }, | |
| { | |
| "title": "Culprit", | |
| "value": "@{replace(replace(replace(replace(coalesce(triggerBody()?['data']?['issue']?['culprit'], triggerBody()?['data']?['event']?['occurrence']?['culprit'], triggerBody()?['data']?['event']?['culprit'], triggerBody()?['culprit'], 'N/A'), decodeUriComponent('%22'), ''''), decodeUriComponent('%5C'), '/'), decodeUriComponent('%0A'), ' '), decodeUriComponent('%0D'), ' ')}" | |
| }, | |
| { | |
| "title": "Environment", | |
| "value": "@{coalesce(triggerBody()?['data']?['event']?['environment'], triggerBody()?['event']?['environment'], 'N/A')}" | |
| }, | |
| { | |
| "title": "Release", | |
| "value": "@{coalesce(triggerBody()?['data']?['event']?['release'], triggerBody()?['event']?['release'], 'N/A')}" | |
| }, | |
| { | |
| "title": "Rule / Action", | |
| "value": "@{coalesce(triggerBody()?['data']?['triggered_rule'], triggerBody()?['action'], if(not(empty(triggerBody()?['triggering_rules'])), join(triggerBody()?['triggering_rules'], ', '), null), 'N/A')}" | |
| }, | |
| { | |
| "title": "Priority", | |
| "value": "@{coalesce(triggerBody()?['data']?['issue']?['priority'], 'N/A')}" | |
| } | |
| ] | |
| }, | |
| { | |
| "type": "FactSet", | |
| "spacing": "Small", | |
| "separator": true, | |
| "facts": [ | |
| { | |
| "title": "Occurrences", | |
| "value": "@{coalesce(triggerBody()?['data']?['issue']?['count'], 'N/A')}" | |
| }, | |
| { | |
| "title": "Users affected", | |
| "value": "@{coalesce(string(triggerBody()?['data']?['issue']?['userCount']), 'N/A')}" | |
| }, | |
| { | |
| "title": "First seen", | |
| "value": "@{coalesce(triggerBody()?['data']?['issue']?['firstSeen'], 'N/A')}" | |
| }, | |
| { | |
| "title": "Last seen", | |
| "value": "@{coalesce(triggerBody()?['data']?['issue']?['lastSeen'], 'N/A')}" | |
| }, | |
| { | |
| "title": "Short ID", | |
| "value": "@{coalesce(triggerBody()?['data']?['issue']?['shortId'], 'N/A')}" | |
| } | |
| ] | |
| }, | |
| { | |
| "type": "FactSet", | |
| "spacing": "Small", | |
| "separator": true, | |
| "facts": [ | |
| { | |
| "title": "Exception", | |
| "value": "@{replace(replace(replace(replace(coalesce(triggerBody()?['data']?['issue']?['metadata']?['type'], triggerBody()?['data']?['event']?['exception']?['values']?[0]?['type'], 'N/A'), decodeUriComponent('%22'), ''''), decodeUriComponent('%5C'), '/'), decodeUriComponent('%0A'), ' '), decodeUriComponent('%0D'), ' ')}" | |
| }, | |
| { | |
| "title": "Message", | |
| "value": "@{replace(replace(replace(replace(coalesce(triggerBody()?['data']?['issue']?['metadata']?['value'], triggerBody()?['data']?['event']?['exception']?['values']?[0]?['value'], triggerBody()?['data']?['event']?['message'], 'N/A'), decodeUriComponent('%22'), ''''), decodeUriComponent('%5C'), '/'), decodeUriComponent('%0A'), ' '), decodeUriComponent('%0D'), ' ')}" | |
| }, | |
| { | |
| "title": "File", | |
| "value": "@{coalesce(triggerBody()?['data']?['issue']?['metadata']?['filename'], 'N/A')}" | |
| } | |
| ] | |
| } | |
| ], | |
| "actions": [ | |
| { | |
| "type": "Action.OpenUrl", | |
| "title": "🔍 View in Sentry", | |
| "url": "@{coalesce(triggerBody()?['data']?['issue']?['permalink'], triggerBody()?['data']?['event']?['web_url'], triggerBody()?['event']?['web_url'], triggerBody()?['url'], 'https://sentry.io')}" | |
| } | |
| ] | |
| } |
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
| { | |
| "type": "object", | |
| "properties": { | |
| "action": { "type": "string" }, | |
| "level": { "type": "string" }, | |
| "project_name": { "type": "string" }, | |
| "culprit": { "type": "string" }, | |
| "message": { "type": "string" }, | |
| "url": { "type": "string" }, | |
| "triggering_rules": { | |
| "type": "array", | |
| "items": { "type": "string" } | |
| }, | |
| "data": { | |
| "type": "object", | |
| "properties": { | |
| "triggered_rule": { "type": "string" }, | |
| "event": { | |
| "type": "object", | |
| "properties": { | |
| "event_id": { "type": "string" }, | |
| "level": { "type": "string" }, | |
| "title": { "type": "string" }, | |
| "message": { "type": "string" }, | |
| "culprit": { "type": "string" }, | |
| "environment": { "type": "string" }, | |
| "release": { "type": "string" }, | |
| "url": { "type": "string" }, | |
| "web_url": { "type": "string" }, | |
| "occurrence": { | |
| "type": "object", | |
| "properties": { | |
| "issueTitle": { "type": "string" }, | |
| "culprit": { "type": "string" } | |
| } | |
| }, | |
| "exception": { | |
| "type": "object", | |
| "properties": { | |
| "values": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "type": { "type": "string" }, | |
| "value": { "type": "string" } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "request": { | |
| "type": "object", | |
| "properties": { | |
| "method": { "type": "string" }, | |
| "url": { "type": "string" } | |
| } | |
| }, | |
| "user": { | |
| "type": "object", | |
| "properties": { | |
| "name": { "type": "string" }, | |
| "email": { "type": "string" } | |
| } | |
| } | |
| } | |
| }, | |
| "issue": { | |
| "type": "object", | |
| "properties": { | |
| "title": { "type": "string" }, | |
| "level": { "type": "string" }, | |
| "culprit": { "type": "string" }, | |
| "substatus": { "type": "string" }, | |
| "status": { "type": "string" }, | |
| "priority": { "type": "string" }, | |
| "count": { "type": "string" }, | |
| "userCount": { "type": "integer" }, | |
| "firstSeen": { "type": "string" }, | |
| "lastSeen": { "type": "string" }, | |
| "shortId": { "type": "string" }, | |
| "permalink": { "type": "string" }, | |
| "project": { | |
| "type": "object", | |
| "properties": { | |
| "slug": { "type": "string" } | |
| } | |
| }, | |
| "metadata": { | |
| "type": "object", | |
| "properties": { | |
| "type": { "type": "string" }, | |
| "value": { "type": "string" }, | |
| "filename": { "type": "string" }, | |
| "function": { "type": "string" } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "event": { | |
| "type": "object", | |
| "properties": { | |
| "title": { "type": "string" }, | |
| "web_url": { "type": "string" }, | |
| "environment": { "type": "string" }, | |
| "release": { "type": "string" } | |
| } | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment