Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
"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
You can’t perform that action at this time.