Get text from email and save in a variable

Please, I have an email that comes in like this:

Sheet: March 2021 Invoices
Business Unit: Tech PLC

Update and revert ASAP

Please, how can I get just “March 2021 invoices” and “Tech PLC” saved in a variable.


Welcome to forums

Use Get Outlook messages for Outlook if installed in your system, else use Get SMTP mail message activity to read the mail

Once that done use For Each activity and change the argument type to System.Net.Mail.MailMessage

Inside For each loop Assign a variable

mailBody = mails.headers(“Body”).ToString

use Regex to extract as below


For Business Unit


Hope this may help you


1 Like

Thank You, working fine now

Hello Srini,
Also, while using action center it doesn’t loop through the For each file it only process it once and sends For Each not set to an instance while looping the second time.