URL from mail body

email
activities

#1

Hi,

Can any one suggest a way for extracting URL from the Body(where body may contain some other matter which we no need to bother,need to extract only Url) of mail and hit that URL in IE browser.

Thanks and Regards,
M.Srikanth


Read/click on the link that is available in email body
How to click on all number of hyperlinks in outlook mail
#2

This is one way.Below link has everything needed


#3

can you tell how to use this regular expression "(?<=HYPERLINK ")(.*)(?=“Click)” in uipath code


#4

Highlighed one. If you are expecting only one email, then instead of foreach

“(?<=HYPERLINK “+chr(34)+”)(.*)(?=”+chr(34)+“click)”

Validate your output – If (matchesOutout.Count >0) matchOutput(0).ToString


#5

I used that activity and I tried with both regular expressions (?<=HYPERLINK “)(.)(?=“Click) ,”(?<=HYPERLINK “+chr(34)+”)(.)(?=”+chr(34)+“click)” and ^[^(]+|(?<=().+?(?=))|[^)]+$ also, But its showing this error , when I am trying to show that URL by using message box.Here I am attaching screenshot

Here is the message that my string is hodling


Read embedded hyperlinks from all emails in gmail
#6

sample.xaml (5.8 KB)

Forgot to mention my regex applies if the Url embedded in below way, replace click in regex with your link Alias name.


#7

One doubt…the code you shared,will it work
1.if body of mail containig some other matter along with URL
2.Can you share a screen shot of Success case like printing the whole string(entire body content) in message box and then only extracting statring and ending part of URL

Please


#8

Let me know how your URL will be sent in the Email

— Click Here with HyperLink
or

— Direct URL — In this case just your Regex will change.

"\S(http|https)\S"**


#9

Yes #vvaidya,

Thank you for your response. It’s working fine.

Thanks a lot.


#10

similar to the sample i shared, just update the pattern with new Regex.Share your workflow if it doesn’t work.


#11

Vvaidya,Thank you its working


#13

Hi,

Instead of displaying it in Message box,i need to click the url in the email body.Help me to do that.

Thanks in advance :slight_smile:


#14

Hi #vvaidya,

I have the same issue, but with a click here with hyperlink, how can I get the hyperlink directly ?

Thanks in advance.