Outlook mail body contains URL,Need to hit on that URL

email
outlook

#1

Hi All,

I my email i use to get scheduled reports link in the mail body, I need to hit on that link so that i can download the data. How to do that, Sample xaml file will be helpful for better understanding.

Link Syntax:
https://psfinancials.cap.com/psc/fsprd/ERP/c/CDM_RPT.CDM_RPT.GBL?Page=CDM_RPT_INDEX&Action
Link will be change in every email.


#2

You can try this way :

  1. String body = mail.Body;

  2. "\S*(http|https)\S*" in Regex Matches Activity

image

  1. if (matchfound.Count>0)
    strURL = matchfound(0).ToString() —> If expecting only 1 URL else use For Each loop

  2. Open Browser -----> strURL


#3

Hi VVaidya,

Thanks for your quick reply, But iam sorry really i didnt get how to work
on it .

Please can you upload sample xaml file, it will be helpful for me to
understand in a better way.because first we need to search unread mail in
that we need to catch recent email with subject name, once we filter mail
with subject in that mail body it contains url link , we need to click on
that link then our raw data will get downloaded.


#4

Have you gone through the academy training?If so, you should be able to perform this task easily.

Please go through if you have time : academy.uipath.com

There are many topics related to this subject, please refer them. Thanks.


#5

Yes, I have gone through E mail automation concept, also i have prepared one project for downloading an attchment file , my using mail.netmail message concept.
But for reading body mail link , iam not getting idea how to link it.


#6

Hi,

Can you give me a sample xaml file for this one :slight_smile:

Thanks in advance .


#7

Hi @nirsha,

Here we go for sample solution to find the URL in the mail and open it in browser:
ClickOnHyperlinkOutlookMail.xaml (11.9 KB)

Thanks
Girish


#8

Its working fine :slight_smile: Thank you so much :slight_smile:


#9

I tried with Xaml,It’s working fine for only one mail with hyperlink,if multiple mails are present other hyperlinks are not opened