Open embedded link in a email body with browser

Hi, I want to build a bot that could go through each auto email, and open a link embedded within a text called “Download Completed Documents”.

I started the bot with
*Use Desktop Outlook App *
*> For each email *
> Right Click “Download here”

However, the bot only open the link of first email using a browser. I have 4 emails in the folder to be open, but the bot seems like stuck in the first email, and only open the first link in that for 4 times.
Could someone guide me from here?

You want to parse the email body to get the URL then use the Go To URL activity.
Not UI automation.

https://forum.uipath.com/search?q=open%20link%20in%20email

@Agnes123

Outlook does not work on ui…what you effectively did is that you are looping through maila but you indicated the first email link so it is always clicking on the same

  1. You need to use currentmail.BodyAsHTMl and get the html bbody
  2. Then use regex to get the url or save the string into text file as .html file
  3. Then use open url to open the extracted url or use open browser to open the html file and then click on the link in browser to open

Cheers

1 Like

Hi Anil, may I ask where can I find get email body asHTML in the first step you mentioned? Thank you for your reply.

@Agnes123

if you get mails then you would get a list of mails say lsmails…then use lsmails(0).BodyAsHTML this give the body as html for first email

cheers

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