当触发事件为在OneDrive for Business上创建文件时,Microsoft Flow失败

问题描述 投票:0回答:1

将新文件添加到OneDrive for business中的文件夹(/ Flows / InvoicesToXero /)时,我触发了流程。

但是,它似乎认为该文件夹是一个文件,这会导致问题:

{“状态”:400,“ message”:“文件ID'/ Flows / InvoicesToXero /'无效。”,“源”:“ api.connectorp.svc.ms”}

这可能是您可能拥有的最简单的流程:enter image description here

这里是完全错误:enter image description here

这是触发器的json :(我尝试使用斜线和不使用斜线)

{
    "inputs": {
        "host": {
            "connection": {
                "name": "@parameters('$connections')['shared_onedriveforbusiness']['connectionId']"
            }
        },
        "method": "get",
        "path": "/datasets/default/triggers/batch/onnewfile",
        "queries": {
            "folderId": "/Flows/InvoicesToXero",
            "maxFileCount": 10
        },
        "authentication": "@parameters('$authentication')"
    },
    "recurrence": {
        "interval": 5,
        "frequency": "Minute"
    },
    "metadata": {
        "b!caGb33cRrkC_foNq9zd0FIdP_xtQDcZEmqyeYyKvO6dYQu456-3vQaC_VKHi8b5w.014XBLOOWVAVAWSVA2QNELELS5LQI3SOJN": "/Flows/InvoicesToXero",
        "flowSystemMetadata": {
            "swaggerOperationId": "OnNewFiles"
        }
    },
    "splitOn": "@triggerBody()"
}

当在子文件夹中将新文件添加到OneDrive for Business中时,如何触发流程?

flow microsoft-flow
1个回答
0
投票

您可以尝试创建另一个连接器,也称为“创建文件时(仅属性)”,请参考此tutorial和以下屏幕截图:

enter image description here

根据上面的屏幕截图,我们可以看到有两个名为“创建文件时(仅属性)的触发器,第二个包含子文件夹。

希望对您的问题有所帮助〜

© www.soinside.com 2019 - 2024. All rights reserved.