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:
![image](https://community.zuar.com/uploads/default/original/1X/f83bbd677917830255a2622e952f05846f4b070b.png)
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:
![image](https://community.zuar.com/uploads/default/original/1X/bb5b6244bf51df004e79616be1a585b23531036d.png)