Extract specific Data from Email Body

HI all, im having to figure out how to extract data from Email Body.

Here is the Extracted data from Email.

and i want to get the following data and SAVE it in excel

Reference No. : KK2252 - John Doe
Ordered By : John Doe
Order item: New Zealand Cat Kibbles
Price : $48.60
Quantity: x1
Description: New Zealand Cat Kibbles | 9 KG (only $0.70 per cup serving)
SKU : Seconds (Cat)

Subtotal : $48.60
Shipping (Shipping Fee) : $8.49
Total : $57.09 NZD

Shipping Address : JOHN Doe
111 Nameof Street, West Philippines
Philippines, Northland 1010
New Philippines

Any Advise?
Thank you in advance:)


Hi @Vincent_Nuestro

You can try the following RegEx pattern for the same:

Reference No\. : (.+)


Price : (.+)


Like this, you can use the required keyword in the similar pattern & extract the desired data.

Hope this helps,
Best Regards.

Hi @Vincent_Nuestro

Use the Save Mail Message activity to save the body of the mail in the Notepad file.
Then Use the Read Text file activity to read the above Notepad file and store the data in a String Variable.
After storing the mail body data in a string variable, Use Generate Datatable From Text activity to generate the datatable by using the string data.
After that use write range workbook activity to write the datatable in to the excel.

Check the below image what are the activities to use in workflow.

Hope it helps!!

Hi @Vincent_Nuestro

  1. Use get outlook mail messages and read the email with the subject you have and want to read.
"[Subject] = The subject mail you want to read"
  1. Use For each activity and save the mail body in txt document. with the help of below syntax:
mailBody= currentItem.Body.ToString
  1. Use Regex expressions to get the required output from the text file.
  2. Use “Write Range Workbook” to write the extracted values into excel.

Hope it helps!!