Download file from URL Link which we receive from email

Hi All,

I want to automate task in there is an email that comes with a URL link. I want to be able to open the email , click on the link and then move that download to file to shared drive. could you please guide me any reference videos or sample workflows to build workflow.

Thanks & Regards,
Niranjan

@niranjan.kummara

To extract the email use isBodyHTMl property and get the body then you can use regex to extract the url

then use http activity and pass the url and give the file location in resource path property to save and it would save it

cheers

@Anil_G I just want to build from scratch, could you please give me any sample video references or workflows would be greatly helpful

@niranjan.kummara

Please check this

Use this in assign to get the url…then use open browser or use application browser to open the url

System.Text.RegularExpressions.Regex.Match(mslist(0).BodyAsHtml,"(?:(?:https?|ftp|file)://|www.|ftp.)(?:([-a-zA-Z0-9+&@#/%=~|$?!:,.]*)|[-a-zA-Z0-9+&@#/%=~|$?!:,.])(?:([-a-zA-Z0-9+&@#/%=~_|$?!:,.])|[a-zA-Z0-9+&@#/%=~_|$])").value

Download of file can be done using http request as well.Check the below video

cheers

hi Anil,

I Tried your way to download file which link is in body. but i got other link not downloading link. please help

Hi @niranjan.kummara

Please follow the steps below. If I helped you, please mark as solved.

Step 1
Install the Web API Activities package
image

Step 2
A sequence in an automation workflow contains an HTTP request activity with "Importar" and "Configurar" buttons. (Captioned by AI)

Step 3
Paste your url link into the endpoint field

Step 4
Add the path where you want to save the downloaded file. Example of my path where the folder I want to save is located. “C:\Users\Eri\Documents\UiPath\CompararCampos\data\file.jpg”

Step 5
file downloaded successfully

A directory on a computer displays a folder named "data" containing an image file named "file.jpg". (Captioned by AI)

I would suggest to get mail and then use http request to download the file without open the browser