我尝试从 Web Activity Azure 数据工厂发送列表,但我无法将列表/数组正确传递给 webhook。请指教!
我以本教程为基础:
https://www.youtube.com/watch?v=ttmETFGYSLg
我在 Azure 数据工厂中有 Web 活动发布以下正文:(这工作正常)
{
"ListOfTestNames:" : @{variables('Test_name_list')}
}
我有“收到 HTTP 请求时”的逻辑应用程序。方法设置为 Post 并且架构如下:
{
"properties": {
"ListOfTestNames": {
"type": "array"
}
},
"type": "object"
}
我在逻辑应用中有 HTTP Webhook。这工作正常并返回包括 ListOfTestName 的正文
@{triggerBody()}
我在逻辑应用中有 HTTP Webhook:这不会返回任何内容。我想知道为什么?
@{triggerBody()?['ListOfTestNames']}
我尝试了 Array 和 String 类型
逻辑应用代码:(由设计者生成){
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"actions": {
"HTTP_Webhook": {
"inputs": {
"subscribe": {
"body": {
"blocks": [
{
"text": {
"text": "*These are list of names* \n ListOfTestNames @{triggerBody()?['ListOfTestNames:']} ",
"type": "mrkdwn"
},
"type": "section"
},
{
"text": {
"text": "There is currently bug and list of names are not displayed ",
"type": "mrkdwn"
},
"type": "section"
}
]
},
"method": "POST",
"uri": "https://hooks.slack.com/services/11111111111111111111111111111111111111111"
},
"unsubscribe": {}
},
"runAfter": {},
"type": "HttpWebhook"
}
},
"contentVersion": "1.0.0.0",
"outputs": {},
"parameters": {},
"triggers": {
"manual": {
"inputs": {
"method": "POST",
"schema": {
"properties": {
"ListOfTestNames:": {
"type": "array"
}
},
"type": "object"
}
},
"kind": "Http",
"type": "Request"
}
}
},
"parameters": {}
}