azure ftp 到 dropbox 连接器在逻辑应用程序中不工作
azure ftp to dropbox connector not working in a logic app
我在发布后大约一个小时想出了以下内容。
那里的例子还不多,所以我把它留了下来。
我正在尝试在 Azure 逻辑应用程序中设置一个新的连接器,以从 FTP 站点获取文件并将它们移动到保管箱文件夹。
我什至没有进入 Dropbox 部分,尽管它找到了 FTP 站点然后删除了文件。
我有一个名为 testing off 的测试目录:
ftp://eek.myftpsite.com/testing/
我显然不理解这里过程的基本内容。
我附上了 ftp 连接器及其操作的图片。
这是触发器的代码:
"operation": "TriggerOnFileAvailable",
"parameters": {
"triggerState": "@coalesce(triggers()?.outputs?.body?['triggerState'], '')",
"FolderPath": "testing",
"FileMask": "CSV*",
"FileType": "Text"
以及动作的代码(这部分原来不需要):
"operation": "GetFile",
"parameters": {
"FilePath": "@{triggers().outputs.body.FilePath}",
"FileType": "Text"
},
"authentication": {
"type": "Raw",
"scheme": "Zumo",
当我将一个名为 CSV_test2.txt 的文件放入 ftp 文件夹中时,其中包含一行文本,片刻之后它就被删除了 - 正如预期的那样。
如果我转到触发器历史记录,它会显示它已成功触发。
触发器的输出看起来也正确(结果是):
"body": {
"FileName": "CSV_test2.txt",
"FolderPath": "testing",
"FilePath": "testing\CSV_test2.txt",
"ServerAddress": "eek.myftpsite.com",
"Content": "This is the data in the test file.",
"ContentTransferEncoding": "None",
"triggerState": "CSV_test2.txt"
}
但是,如果我执行操作,它会显示失败(因为我的下一步错误,它应该只是采用文件路径的东西,比如 dropbox)。
操作的输入显示:
"operation": "GetFile",
"parameters": {
"FilePath": "testing\CSV_test2.txt",
"FileType": "Text"
},
"apiVersion": "2015-01-14",
"authentication": {
"scheme": "Zumo",
"type": "Raw"
}
这对我来说似乎是正确的(不)。
输出显示:
},
"body": {
"status": 404,
"source": "https://ftpconnectora4cf805ee5114235ad1c43445a153673.azurewebsites.net/file/testing/CSV_test2.txt?FileType=Text",
"message": "Path does not exist on FTP Server. The remote server returned an error: (550) File unavailable (e.g., file not found, no access)."
}
我已经尝试了所有我能想到的组合,包括对路径和文件名进行硬编码——但都无济于事。
我真的很想尝试让它在一个新项目上工作,而不是以 "old" 方式进行。
欢迎提出任何建议,
乔
我对它的工作原理有误解。
我以为你设置了一个 FTP 连接器,然后它会监视新文件,然后你设置另一个 FTP 操作来获取每个新文件。
结果是我想多了。
不,直接像这样输入输出:
它的代码是:
"operation": "UploadFile",
"parameters": {
"FilePath": "@{triggers().outputs.body.FilePath}",
"content": {
"Content": "@{triggers().outputs.body.Content}",
"ContentTransferEncoding": "None"
},
"overwrite": true
非常酷...我把我的糊涂留在上面,希望它能帮助其他人。这些都是非常新的东西,但非常令人兴奋。
谢谢,
乔
我在发布后大约一个小时想出了以下内容。 那里的例子还不多,所以我把它留了下来。
我正在尝试在 Azure 逻辑应用程序中设置一个新的连接器,以从 FTP 站点获取文件并将它们移动到保管箱文件夹。
我什至没有进入 Dropbox 部分,尽管它找到了 FTP 站点然后删除了文件。
我有一个名为 testing off 的测试目录: ftp://eek.myftpsite.com/testing/
我显然不理解这里过程的基本内容。
我附上了 ftp 连接器及其操作的图片。
"operation": "TriggerOnFileAvailable",
"parameters": {
"triggerState": "@coalesce(triggers()?.outputs?.body?['triggerState'], '')",
"FolderPath": "testing",
"FileMask": "CSV*",
"FileType": "Text"
以及动作的代码(这部分原来不需要):
"operation": "GetFile",
"parameters": {
"FilePath": "@{triggers().outputs.body.FilePath}",
"FileType": "Text"
},
"authentication": {
"type": "Raw",
"scheme": "Zumo",
当我将一个名为 CSV_test2.txt 的文件放入 ftp 文件夹中时,其中包含一行文本,片刻之后它就被删除了 - 正如预期的那样。 如果我转到触发器历史记录,它会显示它已成功触发。 触发器的输出看起来也正确(结果是):
"body": {
"FileName": "CSV_test2.txt",
"FolderPath": "testing",
"FilePath": "testing\CSV_test2.txt",
"ServerAddress": "eek.myftpsite.com",
"Content": "This is the data in the test file.",
"ContentTransferEncoding": "None",
"triggerState": "CSV_test2.txt"
}
但是,如果我执行操作,它会显示失败(因为我的下一步错误,它应该只是采用文件路径的东西,比如 dropbox)。 操作的输入显示:
"operation": "GetFile",
"parameters": {
"FilePath": "testing\CSV_test2.txt",
"FileType": "Text"
},
"apiVersion": "2015-01-14",
"authentication": {
"scheme": "Zumo",
"type": "Raw"
}
这对我来说似乎是正确的(不)。 输出显示:
},
"body": {
"status": 404,
"source": "https://ftpconnectora4cf805ee5114235ad1c43445a153673.azurewebsites.net/file/testing/CSV_test2.txt?FileType=Text",
"message": "Path does not exist on FTP Server. The remote server returned an error: (550) File unavailable (e.g., file not found, no access)."
}
我已经尝试了所有我能想到的组合,包括对路径和文件名进行硬编码——但都无济于事。 我真的很想尝试让它在一个新项目上工作,而不是以 "old" 方式进行。
欢迎提出任何建议, 乔
我对它的工作原理有误解。 我以为你设置了一个 FTP 连接器,然后它会监视新文件,然后你设置另一个 FTP 操作来获取每个新文件。 结果是我想多了。
不,直接像这样输入输出:
它的代码是:
"operation": "UploadFile",
"parameters": {
"FilePath": "@{triggers().outputs.body.FilePath}",
"content": {
"Content": "@{triggers().outputs.body.Content}",
"ContentTransferEncoding": "None"
},
"overwrite": true
非常酷...我把我的糊涂留在上面,希望它能帮助其他人。这些都是非常新的东西,但非常令人兴奋。
谢谢,
乔