How to get the contents of a forwarded email in UiPath

Dear everyone,

I’m a newcomer to UiPath. I have an issue regarding reading the contents of a forwarded email in UiPath. The details are below.
For example, I have a forwarded outlook email like:
How can I get the main content email and the main content forwarded email as in the image? Please help me.

Hi @huychenh.robot

Could you share your current steps in UiPath?

It should be as easy as putting your fetched email variable into this field:

Hi @loginerror,

This is my current steps.

  1. I’m using the GetOutlookMailMessages activity to read my unread outlook emails, the return output is set to the listMailMessage_var variable.
  2. From the listMailMessage_var variable above, I want to get the main content and the forward main content emails. I have declared 2 variables: emailMainContent_var and fwEmailMaincontent_var (string).
    And my expectation is:
  • emailMainContent_var =
    “This is the main content. Thanks.

  • fwEmailMaincontent_var = “Here is my test email.”

But up to now, I could not find any solution. Could you please suggest me some tips? Thanks so much.

If I understand your requirement correctly, you want to append something to the top of the email and then forward it further.

I believe this would be the way to append something to an email:

"This Is the main content. Thanks. "+Environment.NewLine+"------------------------------------------------------""." + Environment.NewLine + Mails(0).Body

Here I simply took the first element from the list of mails returned by the Get Outlook Mail Message activity, and then modified its .Body property with some extra text.

Afterwards, you should be able to use that same variable that was just modified in the Forward field: