Approval Type - Internal Transfer Request
Purpose Of Transfer - Normal Transfer
Internal Transfer Number - ITRAP-000897525
Date of Submission - 24 June 2023
Originator - ABC
Internal Transfer Subject - From Commercial to Inspection Room
Thanks and Regards,
XYZ.
I want all the below mentioned values in separate variables.
Internal Transfer Request Normal Transfer ITRAP-000897525 24 June 2023 ABC From Commercial to Inspection Room
Hoping that you can get to the email and then to its body though UiPath Activities
You can use Regex to retrieve the highlighted text in you message, or split string operations.
For example:
With Regex: (?=Type - ).*+(?=\s)
You can use Split function if you’ll be getting a standard format, i.e. purpose type would always be coming after approval type, else go ahead with regex.
With Split function:
Notice that I didn’t include the space character after the “-” in each label and added a .Trim at the end to make sure the code still works even when the input has inconsistent formatting.
The Get Outlook Mail Messages activity results into a List type of variable. Lists can be looped through with the For Each activity (see attached XAML).
You are directly displaying the the Mail messages List, instead you need to loop on every mail and then extract body for a particular email. Refer screenshot: