We're so close!
There's currently a way to provide custom headers. Can we have a 'custom wrapper' or 'custom template'?
Please and thank you!
--------- Description ----------------
You can configure webhooks with your app as described here. They can be triggered for Package upload, Team Server push (git), and Alerts. I just attempted integrating this with Slack. Slack's webhook endpoint expects a top-level key "text". Like this:
{
"text": "Message content here"
}
Unfortunately, Mendix webhooks have pre-configured structure. Like this:
{
"app_name": "your-app-name",
"environment": "your-environment-name",
"environment_id": "n90c72er-344e-4a26-8efd-e0695234b465",
"id": "73eb456a-10d4-4821-ae58-31e4a49753ca",
"message": "INFORMATIONAL: Runtime heartbeat is okay.",
"service": "Application Status",
"severity": "Recovery",
"timestamp": "2023-08-18T08:11:22.586000+00:00",
"url": "https://your-mendix-app.mendixcloud.com"
}
When Slack receives the above request it gives a 400 error "No text". Instead it's looking for something like this:
{
"text": {
"app_name": "your-app-name",
"environment": "your-environment-name",
"environment_id": "n90c72er-344e-4a26-8efd-e0695234b465",
"id": "73eb456a-10d4-4821-ae58-31e4a49753ca",
"message": "INFORMATIONAL: Runtime heartbeat is okay.",
"service": "Application Status",
"severity": "Recovery",
"timestamp": "2023-08-18T08:11:22.586000+00:00",
"url": "https://your-mendix-app.mendixcloud.com"
}
}
We're so close!
There's currently a way to provide custom headers. Can we have a 'custom wrapper' or 'custom template'?
Please and thank you!