How specific text from email body outlook

I have email with body email, example

total : 100
average : 99

how i can get value 100 , 99 and write to excel ?

@ochyalrin
Once you have read your mail,
you will get list of mail messages
Loop through it using for each and change the loop type to mail.message
Then Split the item.body with new line and loop through it
Inside loop Using IF condition Check if Total/Average came in the line , if came then get the next corresponding value

or
you can use Regex for Item.body to find the Total amount and average amount

Check this link: How to get value in body mail using uipath

You can use this regex: \d.*

Regards
Shanmukh

1 Like

Once you get the email body, use regular expression to extract the required values. In UiPath, there are two extensive regex methods that will help you achieve this, IsMatch and Matches.
Below are the expressions you can use,
Total:

(?<=total[ :]+)[0-9.,]+

Average:

(?<=average[ :]+)[0-9.,]+

References:

1 Like

thankyou, can you give me example of .xaml file ?

I don’t have the xaml file created. If you send me your workflow file, I can review and update it.
I suggest you try it by your own first. If you are unable to find solution, definitely, will help.

2 Likes

Check this workflow, @ochyalrin
Email_DataExtraction.xaml (13.4 KB)

1 Like

thannkyou so much :slight_smile:

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