Here’s a POST request template I use for Mitto job notifications in Slack:
Basic Mitto Slack Webhook
Event: JOB_FAILURE
Method: POST
Content Type: application/json
Body:
{
"text": "Job Failed!: ${system['fqdn']} - ${job['title']}\nhttps://${system['fqdn']}/#!/job/${job['id']}"
}
Example result:
Fancy Mitto Slack Webhook
This example uses Slack’s Block Kit.
Event: JOB_FAILURE
Method: POST
Content Type: application/json
Body:
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": ":rotating_light: Mitto Job Failed!"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Mitto URL: https://${system['fqdn']}\nJob Title: ${job['title']}\nJob URL: https://${system['fqdn']}/#!/job/${job['id']}"
}
}
]
}
Example result: