Hi UiPathians,
Attached is the ‘Accept Invitation’ button in my outlook mail inbox that is supposed to be clicked using UiPath. I tried using the regex “(?<=You’re invited to join av-test!)(.*)(?=ACCEPT INVITATION)”
but it does not work(UiPath is unable to find this pattern based on this regex)
Any help on this is highly appreciated.
Thank you!
@Akanksha_Varshney
if possible kindly upload your xaml…
I have never seen anyone using regex as wild for selector (except in loop of UiElements)
I was not able to find any selector for email body
try some thing like this…
get outlook mail messages…
get text body of your desired email
then use regex pattern “(HYPERLINK)(.*)(Your hyper link text)”
in 2nd group you will get your link address
sorry cant attach xaml as about to logoff…
Prop_3.xaml (13.2 KB)
Hi @AkshaySandhu,
Thanks for looking into and helping.
I’ve attached the XAML here(Please ignore/remove the last looping message boxes)
I tried with your solution above but it does not seem to be working.
This is the method I tried after going through tons of similar posts.
Am open to ideas on how to click/extract URL of an embedded hyperlinked button in an Outlook mail.
Thanks again!
try this in log message:
System.Text.RegularExpressions.Regex.Match(strMailBody,“(HYPERLINK)(.*)(ACCEPT INVITATION)”).Groups(2).ToString
Hi @AkshaySandhu,
Thanks for all the help you are providing.
I tried to put your regex at Log level but don’t seem to receive anything there. PFA screenshot for the same.

Thank you!
@ovi @aksh1yadav @vvaidya @ClaytonM
Any help on this is highly required and appreciated!
You will need to test the regex on an example body message first (outside of your code) to make sure your Regex is correct. The blank logs leads me to believe your Regex is wrong. You can also show what the body is here and maybe we can test your Regex to make sure it’s a working pattern.
Once you get one body working, then you can place it in your loop or process.
@Akanksha_Varshney
sorry for late response…
Main.xaml (5.5 KB)
i attached working xaml please check…
if your email body is different, then as @ClaytonM said, it will be better if you post email body so that we can create the required regex pattern
Thanks @AkshaySandhu and @ClaytonM for all your help.
Will try your suggestions and get back!