Extracting text from email to notepad

Hi,

May I know how to extract text from email to notepad?

Email Body:
Kindly see details below.

Name: Mark Reyes

Sex: Male

Address: Los Angeles

Phone number: 12345678910

========================
Notepad:
image

Thank you.

Best regards,
Llessur

@Llessur

You can use regex to get each value into separate variable and then write it to notepad using write text file or append line activities

(?<=Name\:).*

Namevar = system.Text.RegularExpressions.Regex.Match(emailbodyvariable,"(?<=Name\:).*",RegexOptions.MultiLine).Value.Trim

Replace name with other values then you would get each

Cheers

Can you elaborate it more?

@Llessur

use the above in assign activity

you would get the data into variables namevar…similarly for sex etc get them into variables

then use

cheers

Hie @Llessur this is you all email Data or you want to extract only this -this part from the mail body ?

Hi @Llessur

if you are using outlook,

use get outlook mail message activity, it will get all emails based on your conditions.
use for each to process each email.
in for each you can use below syntax to get the body

currentMailMessage.Body.ToString