-
Notifications
You must be signed in to change notification settings - Fork 3
Webhook Examples Slack
Create a Slack App and enable Incoming Webhooks: https://api.slack.com/messaging/webhooks
To create nicely formatted Slack messages, the following links may be helpful:
- Slack message formatting: https://api.slack.com/reference/surfaces/formatting
- Slack Block Kit Builder: https://app.slack.com/block-kit-builder/
For each example, the following details will be shared:
- Screenshot of example
- Variables used from Turbonomic's Action DTO
- User Variables you must supply
- Link to JSON Workflow DTO to add webhook to your Turbonomic instance
- Link to unescaped JSON for Slack Block Kit Builder in case you want to modify the template to your liking
Each example has been written for a specific Action. Please note the platform (On-Prem, Cloud, Container, etc), entity (VM, DB, Workload Controller, etc), and action (Move, Resize, etc) when implementing the webhooks. Webhooks may fail if implemented on the incorrect platform, entity, or action as certain Action DTO variables only exist for specific types of actions.
This Workflow DTO was written to accommodate On-Prem > VM > Move actions. It could work for other actions as long as the action DTO has the same variables.

-
Action DTO Variables
$action.target.className$action.actionType-
$action.actionState(using IF/ELSEIF/ELSE statement to evaluate if action isSUCCEEDED,READY,IN_PROGRESS,FAILED) $action.actionMode$action.userName$action.updateTime$action.target.displayName$action.currentEntity.displayName$action.newEntity.displayName$action.risk.subCategory$action.risk.description$action.target.uuid
-
User Variables:
- Add your Slack Webhook URL where it says
<YOUR SLACK WEBHOOK URL> - Add your Turbo URL where it says
<YOUR_TURBO_URL>
- Add your Slack Webhook URL where it says
-
Workflow DTO: On-Prem VM Move
-
Slack Block Builder JSON: On-Prem VM Move
This Workflow DTO was written to accommodate On-Prem > VM > Resize actions. It could work for other actions as long as the action DTO has the same variables.
-
Action DTO Variables
$action.target.className$action.actionType-
$action.actionState(using IF/ELSEIF/ELSE statement to evaluate if action isSUCCEEDED,READY,IN_PROGRESS,FAILED) $action.actionMode$action.userName$action.updateTime$action.target.displayName$action.details$action.risk.subCategory-
$action.risk.reasonCommodities(then using a #foreach loop, iterate through each commodity,$resizeRisk) $action.target.uuid
-
User Variables:
- Add your Slack Webhook URL where it says
<YOUR SLACK WEBHOOK URL> - Add your Turbo URL where it says
<YOUR_TURBO_URL>
- Add your Slack Webhook URL where it says
-
Workflow DTO: On-Prem VM Resize
-
Slack Block Builder JSON: On-Prem VM Resize