Resources

Knowledge Base

How to download a file from a server

There are two ways to download files from a server:

1. By using UiPath workflows, you can download a file from a server either through User Interface. 

Pros of this method:

  1. Basically you are able to download/upload any file.

Cons of this method:

  1. It takes some time to develop the workflow.
  2. This solution works only in front office .

Example: Download files from Yahoo Finance

2. Through an Web API integration. 

Pros of this method:

  1. Thanks to the API integresion the request it's made almost instantly.
  2. This solution could be implemented as well in background automation.

Example:

  • Download the image from the following URL

Before starting we need to ensure that we have Web API package. How we do this ? 

First we check in the activities panel for "Web API", if the package is not there, we go to Package Manager and install Web API package and then restart UiPath Studio. For more information regarding package installation please click here

Now we are ready to go. 

  • Drag and drop from the activities panel a Http Request activity.
  • The wizard from the image below will appear:
    • Complete the EndPoint with the URL
    • In this example we want to download a file so we will let the Method as "Get"
    • Press "Ok"

HttpReqestWizard.png

  • The last thing we have to do is to give a name with/without a certain path.HttpRequest.png

I didn't specify the full path, I just gave a name to my picture and this will be saved in the same directory as the workflow.

Download Demo Project