Created
December 23, 2019 13:33
-
-
Save cdennig/8255f5812f8c7006e5dc1b042c1eaeff to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"definition": { | |
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", | |
"actions": { | |
"Parse_JSON": { | |
"inputs": { | |
"content": "@triggerBody()", | |
"schema": { | |
"properties": { | |
"Channel": { | |
"type": "string" | |
}, | |
"Text": { | |
"type": "string" | |
}, | |
"Username": { | |
"type": "string" | |
} | |
}, | |
"type": "object" | |
} | |
}, | |
"runAfter": {}, | |
"type": "ParseJson" | |
}, | |
"Post_a_message_(V3)": { | |
"inputs": { | |
"body": { | |
"body": { | |
"content": "<p>Kubernetes Reboot Daemon action has been triggered: <br>\n<br>\n@{triggerBody()['Text']}</p>", | |
"contentType": "html" | |
} | |
}, | |
"host": { | |
"connection": { | |
"name": "@parameters('$connections')['teams']['connectionId']" | |
} | |
}, | |
"method": "post", | |
"path": "<TEAMS_CHANNEL_URI>" | |
}, | |
"runAfter": { | |
"Send_an_email_(V2)": [ | |
"Succeeded" | |
] | |
}, | |
"type": "ApiConnection" | |
}, | |
"Send_an_email_(V2)": { | |
"inputs": { | |
"body": { | |
"Body": "<p>Kubernetes Reboot Daemon action has been triggered: <br>\n<br>\n@{triggerBody()['Text']}</p>", | |
"Subject": "@body('Parse_JSON')?['Username']", | |
"To": "christian.dennig@outlook.com" | |
}, | |
"host": { | |
"connection": { | |
"name": "@parameters('$connections')['office365']['connectionId']" | |
} | |
}, | |
"method": "post", | |
"path": "/v2/Mail" | |
}, | |
"runAfter": { | |
"Parse_JSON": [ | |
"Succeeded" | |
] | |
}, | |
"type": "ApiConnection" | |
} | |
}, | |
"contentVersion": "1.0.0.0", | |
"outputs": {}, | |
"parameters": { | |
"$connections": { | |
"defaultValue": {}, | |
"type": "Object" | |
} | |
}, | |
"triggers": { | |
"manual": { | |
"inputs": { | |
"schema": { | |
"properties": { | |
"Channel": { | |
"type": "string" | |
}, | |
"Text": { | |
"type": "string" | |
}, | |
"Username": { | |
"type": "string" | |
} | |
}, | |
"type": "object" | |
} | |
}, | |
"kind": "Http", | |
"type": "Request" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment