Reputation: 13
How can you determine the email data from a request body and integrate it into the Outlook function?
Upvotes: 1
Views: 1347
Reputation: 10920
You can easily send the whole Body
of the response from the Http request into the Body of the Email using outlook.
See below
Select the body from the HTTP request and pass it to the email body (as a raw JSON)
The corresponding code will look like
{
"$connections": {
"value": {
"office365": {
"connectionId": "/subscriptions/....../Microsoft.Web/connections/office365",
"connectionName": "office365",
"id": "/subscriptions/......./Microsoft.Web/locations/southindia/managedApis/office365"
}
}
},
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"actions": {
"Send_an_email": {
"inputs": {
"body": {
"Body": "@{triggerBody()}",
"Subject": "test",
"To": "[email protected]"
},
"host": {
"connection": {
"name": "@parameters('$connections')['office365']['connectionId']"
}
},
"method": "post",
"path": "/Mail"
},
"runAfter": {},
"type": "ApiConnection"
}
},
"contentVersion": "1.0.0.0",
"outputs": {},
"parameters": {
"$connections": {
"defaultValue": {},
"type": "Object"
}
},
"triggers": {
"manual": {
"inputs": {
"method": "POST",
"schema": {}
},
"kind": "Http",
"type": "Request"
}
}
}
}
Upvotes: 2