Hi, I am new to UIPath and have been trying to read mails and extract email id mentioned in the body of each email. I got through extracting data of mail body but i couldnt get the email ids from it.
Below is a sample mail
Please mail the loan documents for final processing. firstname.lastname@example.org
Send it to to get it approved krishnanGopal@outlook.com
For further queries, reach out ITMPServices@live.com
In the above mail content, I need to get the email ids which are mentioned in the body and store it in a data table. Kindly help.
Use below regular expression to get Gmail id from body of the mail.
Welcome buddy to UiPath Community…! Thats a good question to start with…!
Kindly find the below xaml for your reference, hope this would help you…!
Harish.zip (1.9 KB)
Thank you Lakshman for giving an idea, but the email ids present in the mail body wont follow same format like ‘.test’ and also the domains change. To be precise, i want to get any type of email address that are present in the mail body and the only common thing is ‘@’ symbol and ‘.com’ text.
Try below regular expression:
If you see in the text the email has a prefix as “to” and the email ends with “for” and this pattern will be followed in all the mails i think
If yes, then use the below regex, which extract all the emai id’s
(?<=to )(.+)(?= for)
Use Matches Activity in user sequence and click on configure regular expression
then you get a window in that select regex as email like shown in image
, give input as your email body and for each out put variable to get the mails or else use
reqular expression in matches activity do the same.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.