0

I'm using gmail account to extract the data, from the body of the mail and I want to store that data in a word/excel folder. Can someone explain the process to achieve this?

The email body would be like this:

Hello!

First name

John

Last name

Doe

Email

sample@gmail.com

Message

Text

George
  • 1

1 Answers1

0

You can read the email using the Get IMAP Mail Message activity and get the Body of Email in a Text then you can use the String manipulation/regex to find the required text and then store it in Excel/Word.

You may need to keep the following things in mind.

  1. You will need to create an App Password by going to your Google Account Settings (https://myaccount.google.com/apppasswords) and use that Password in the Get Mail Message Activity.
  2. To Get the Email Body the EmailMessage.Body property will not work instead you will need to use the EmailMessage.Headers("PlainText") Here EmailMessage is the Each Email Message from the list of Message. Here is the screenshot.

This is how your Sequence should look

Above If condition is used to check if the Subject of Email which we want to read.

  1. Once you get the Email Body in a String Variable you can use either String Manipulation or Regex to extract the required data from the body of the email and write to the excel or word.

Hope this helps.

Ankit Roy
  • 44
  • 5