Download file from Studio Web

Hello! I designed the following automation-flow on UiPath Studio WEB: open the browser at an specific page > click on the button “Exportar todas” available on that page > click on “Planilha” (once the button “Planilha is clicked”, it starts to download a file, so I set put this step insed the activity “Wait for Download”) > then I would like to make it upload the downloaed file to my OneDrive account.

But I have no idea of what kind of information I should set in the field “Downloads folder”, nor how exactly should I set the activity “Upload Files” in order to make the file be saved on my OneDrive (I already linked UiPath to my OneDrive account, therefore UiPath is already reading the folders inside my OneDrive).

Could somebody PLEASE help me with this?

Hi @bipenett

It looks like it should have a default expression provided, which by default points to the Downloads folder of the user home directory:

System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "Downloads")

By default, the serverless Chrome will download the files there, so it should work out of the box.

I’ve tested it right and it does seem to work, but I did find one bug - the default output variable of the Wait for Download activity does not seem to work outside of the scope of this activity.
So until we fix that, you might have to build your workflow by assigning a variable to it first, like so:

1 Like

Hello Maciej! Thank´s a lot for your attention and patience trying to help me with this, fellow!

Well, I made these steps that you suggested, but running it in the “text step-by-step” i realized that it gets stuck on “Running” even after the download complete (it appears that the automation didn’t realize that the file was downloaded - wich it was, since I´ve seen it being downloaded in the virtual Chrome instance)


Let me try to make a guess, but I might be wrong.

For your input property, when you open it in an expression editor, does it show like this:


Or like this:


The thing is, this is an expression, so the way to get this work would be the latter option. The former is treating it as text, and does not resolve it dynamically.

Actually i firstly pasted the expression directly to the field “Downloads Folder”, but then I realized that I should had pasted it to the field “Insert expression” instead.

Worked like a charm! THANKS A LOT, BUDDY!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.