Download file from URL to a required location

Hello Everyone,

I am trying to download a file from the URL directly (auto download). the URL itself is having the file name at the end with the extension.

I have tried it with the C# code & code which are not working.

Would request if anyone has any other idea .

Divya Varshney


Please install webapi packages and then use http request …pass the url in Request URL field…and you have a field Filename for response attachment which you can give a filepath and the response file is saved there

Hope this helps


Hi @Anil_G ,

Thanks for the response , I have tried webAPI as well . it throws an error and the message is “Method not found” .

Divya Varshney

did u already try invoke code like this?

Code inside invoke code

Using wc As New System.Net.WebClient()
End Using

Arguments to ur invoke code activity:

what error msg u get?

Hello @Divya3

you can use Xebia - Download File from URL - RPA Component | UiPath Marketplace activity to directly download the file from URL.



The error looks like it is conflicting with some other dependency…can you try it in a fresh project and also are you getting thsi error when you run it?


Hi @kali ,

Yes I tried this ,but the file which got downloaded was corrupted.

Divya Varshney