蔚蓝ftp到Dropbox的连接器在逻辑应用程序无法正常工作 [英] azure ftp to dropbox connector not working in a logic app

查看:187
本文介绍了蔚蓝ftp到Dropbox的连接器在逻辑应用程序无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通了以下大约一个小时后发布。
不会有太多的例子在那里还没有,所以我离开了这件事。

I figured the below out about an hour after posting. There are not many examples out there yet so I left this up.

我试图安装在Azure的逻辑应用新的连接器从FTP站点下载文件,并将其移动到收存箱文件夹。

I am trying to setup a new connector in a Azure Logic App to get files from a FTP site and move them to a dropbox folder.

我没有得到,甚至到Dropbox的一部分,虽然它被发现的FTP站点,然后删除文件。

I was not even getting TO the dropbox part, although it was finding the FTP site and then deleting files.

我有一个名为测试过的一个测试目录:
ftp://eek.myftpsite.com/testing/

I have a test directory called testing off of: ftp://eek.myftpsite.com/testing/

我显然不理解的东西在这里这个过程的基础。
我已附加ftp的连接器和它的动作的画面。

这里是code为触发:

I am obviously not understanding something fundamental to this process here. I have attached a picture of the ftp connector and it action. Here is the code for the trigger:

   "operation": "TriggerOnFileAvailable",
            "parameters": {
                "triggerState": "@coalesce(triggers()?.outputs?.body?['triggerState'], '')",
                "FolderPath": "testing",
                "FileMask": "CSV*",
                "FileType": "Text"

而code的作用(这部分竟然不被需要):

And the code for the action (this part turned out to be not needed):

   "operation": "GetFile",
            "parameters": {
                "FilePath": "@{triggers().outputs.body.FilePath}",
                "FileType": "Text"
            },
            "authentication": {
                "type": "Raw",
                "scheme": "Zumo",

当我把一个名为CSV_test2.txt用的FTP文件夹的文本将一行文件,一个短位后,它被删除 - 如预期。
如果我去触发历史就说明它成功地发射。
从触发器的输出看起来是正确的,以及(原来是):

When I drop a file named CSV_test2.txt with one line of text in it in the ftp folder, after a short bit it is removed - as expected. If I go to the trigger history it shows it fired successfully. The outputs from the trigger looks correct as well (turns out it was):

  "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的)。
对这些行动的输入显示:

But if I go to the actions it shows as failed (because I had the wrong next step, it should have just been something that takes a filepath, like dropbox). The inputs for the actions show:

   "operation": "GetFile",
"parameters": {
    "FilePath": "testing\\CSV_test2.txt",
    "FileType": "Text"
},
"apiVersion": "2015-01-14",
"authentication": {
    "scheme": "Zumo",
    "type": "Raw"
}

这似乎是它是正确的我(没了)。
输出显示:

Which seems like it is correct to me (nope). The outputs shows:

    },
"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)."
}

我已经试过事情我能想到的,包括刚才硬编码路径和文件名,每个组合 - 所有这些都无济于事。
我真的想尝试得到这个工作的一个新项目VS做旧的方式。

I have tried every combination of things I can think of, including just hardcoding the path and file name -- all to no avail. I am really wanting to try to get this working on a new project vs doing it the "old" way.

任何建议,欢迎,

Any suggestions are welcome, Joe

推荐答案

我有它是如何工作的误解。
我还以为你设置一个FTP连接,然后这将监测新的文件,则安装另一个FTP操作来获得每个新文件。
对我而言在思考的一点事实证明。

I had a misunderstanding of how it worked. I thought you setup a FTP connector and which would then monitor for new files, then you setup another FTP action to get each new file. A bit of over thinking on my part it turns out.

不,就直接喂输出是这样的:

Nope, just feed the output directly like this:

在code因为它是:

 "operation": "UploadFile",
            "parameters": {
                "FilePath": "@{triggers().outputs.body.FilePath}",
                "content": {
                    "Content": "@{triggers().outputs.body.Content}",
                    "ContentTransferEncoding": "None"
                },
                "overwrite": true

pretty很酷...我离开得过且过关于那里的希望,它可以帮助别人了。这是所有的pretty新的东西,但pretty令人兴奋的。

Pretty cool...I am leaving my muddling about up there in the hopes that it helps somebody else out. This is all pretty new stuff, but pretty exciting.

感谢您,

这篇关于蔚蓝ftp到Dropbox的连接器在逻辑应用程序无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆