逻辑应用程序 - 使用 json 从 http 请求正文获取电子邮件信息
Logic Apps - Get Email Infos from http request body with json
如何确定请求正文中的电子邮件数据并将其集成到 Outlook 功能中?
您可以使用 outlook 轻松地将来自 Http 请求的整个 Body
响应发送到电子邮件正文中。
见下文
Select 来自 HTTP 请求的正文并将其传递给电子邮件正文(作为原始 JSON)
对应的代码会是这样
{
"$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": "abc@abc.com"
},
"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"
}
}
}
}
如何确定请求正文中的电子邮件数据并将其集成到 Outlook 功能中?
您可以使用 outlook 轻松地将来自 Http 请求的整个 Body
响应发送到电子邮件正文中。
见下文
Select 来自 HTTP 请求的正文并将其传递给电子邮件正文(作为原始 JSON)
对应的代码会是这样
{
"$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": "abc@abc.com"
},
"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"
}
}
}
}