How can i extract purpose, property note type,notes from email body eg Create new and all?
Purpose: Create New
Property Note Type: Grease Trap
Property Status: Pending
Notes: RPA Test – LL reported PX grease trap leaking into downstairs tenant. Contacted FM and GM to have PX vendor investigate ASAP and make needed repairs.
Hi @aparna30
Your steps could as follows
Use GetOulook or Imap mail activity to read the mail messages.
Use For each and Change the type argument to mail message.
With in the body of the loop use Item.Body.Tosting it will Display the body of the mail as String
The use regex to match the value you need to fetch the value you need!
Check with the post below to fetch value using regex!
Regards
give a try on this generic pattern
^(.*?)(?:\:)(.*?)$
And rely on groups (you would later trim the values)
Along with the Post from @Steven_McKeering you will also get the link to and vice versa:
How can i get these 4 matches in a variable?
Hi @aparna30
Please use below inline code,
Kindly check/test the given solution and close the topic by marking the solving post as ‘solution’. Thank you.
Depending on the needs we can look for a datatype supporting us for the next processing steps
e.g. Dictionary:
myMatches.Cast(Of Match).toDictionary(Function (m) m.Groups(1).toString, Function (m) m.Groups(2).toString.Trim)
Array:
myMatches.Cast(Of Match).Select(Function (m) m.Groups(1).toString.Trim & ":" & m.Groups(2).toString.Trim).toArray