仅当文件夹预先存在时,Azure Logic应用程序触发(Box)到(FTP)才会成功。正如我在Logic Apps API中所提到的,触发器是围绕文件而不是文件夹。会不会有任何解决方法。
下面更新=================== ======我想要的是在父文件夹上获取监视,并且任何文件夹或文件创建都会获得触发事件并复制或创建目标。
For example: /parentfolder /childfolder1/1.jpg /childfolder2/2.jpg . . ./childglobalfolder/somefile.html
然后我在源位置/ childglobalfolder下添加一个新文件夹在父文件夹下的文件,我没有发现这个触发!我错过了什么吗?
请在代码视图中找到我的代码:
{
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"actions": {
"Create_file": {
"inputs": {
"body": "@triggerBody()",
"host": {
"api": {
"runtimeUrl": "https://logic-apis-eastus.azure-apim.net/apim/ftp"
},
"connection": {
"name": "@parameters('$connections')['ftp_1']['connectionId']"
}
},
"method": "post",
"path": "/datasets/default/files",
"queries": {
"folderPath": "/",
"name": "@{triggerOutputs()['headers']?['x-ms-file-path']}"
}
},
"runAfter": {},
"type": "ApiConnection"
}
},
"contentVersion": "1.0.0.0",
"outputs": {},
"parameters": {
"$connections": {
"defaultValue": {},
"type": "Object"
}
},
"triggers": {
"When_a_file_is_created": {
"inputs": {
"host": {
"api": {
"runtimeUrl": "https://logic-apis-eastus.azure-apim.net/apim/box"
},
"connection": {
"name": "@parameters('$connections')['box']['connectionId']"
}
},
"method": "get",
"path": "/datasets/default/triggers/onnewfile",
"queries": {
"folderId": "109772848XX"
}
},
"metadata": {
"109772848XX": "/parentfolder"
},
"recurrence": {
"frequency": "Second",
"interval": 15
},
"type": "ApiConnection"
}
}
}
答案 0 :(得分:1)
目前没有连接器不支持文件夹事件。我看到他们中的大多数只有文件事件。你应该投票支持添加这个想法feedback.azure.com/forums/287593-logic-apps