Skip to content

Instantly share code, notes, and snippets.

@ashutosh887
Created October 20, 2023 04:34
Show Gist options
  • Save ashutosh887/4fee54772073f847aa86f7b079e4f08e to your computer and use it in GitHub Desktop.
Save ashutosh887/4fee54772073f847aa86f7b079e4f08e to your computer and use it in GitHub Desktop.
Slack Message Template
{
"blocks": [
{
"type": "context",
"elements": [
{
"type": "mrkdwn",
"text": "*`Firing`: Latency P99 on orders-demo exceeds threshold*"
}
]
},
{
"type": "rich_text",
"elements": [
{
"type": "rich_text_section",
"elements": [
{
"type": "text",
"text": "Summary of this alert:\n"
}
]
},
{
"type": "rich_text_list",
"style": "bullet",
"elements": [
{
"type": "rich_text_section",
"elements": [
{
"type": "text",
"text": "item 1: "
},
{
"type": "emoji",
"name": "black_circle"
}
]
},
{
"type": "rich_text_section",
"elements": [
{
"type": "text",
"text": "item 2: "
},
{
"type": "text",
"text": "this is a list item"
}
]
},
{
"type": "rich_text_section",
"elements": [
{
"type": "text",
"text": "item 3: "
},
{
"type": "link",
"url": "https://cubeapm.com/",
"text": "a slow request here",
"style": {
"bold": true
}
}
]
}
]
}
]
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Actions on this alert"
},
"accessory": {
"type": "button",
"text": {
"type": "plain_text",
"text": "Preview Alert",
"emoji": true
},
"value": "click_me_123",
"url": "https://cubeapm.com",
"action_id": "button-action"
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment