cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Michael_Anton_F
Frequent Visitor

Get Email Body of last email

Hi,

 

I am looking for a way of getting the body of an email without all the history. So basically, I want to have the body of the email I flagged and not allthe old emails also included in that email.

 

Thanks for your help!


Regards,

Michael

1 ACCEPTED SOLUTION

Accepted Solutions
Michael_Anton_F
Frequent Visitor

Found it myself, Message 5 has the solution:
https://powerusers.microsoft.com/t5/Building-Flows/Extract-only-the-text-from-the-latest-reply-in-an...

I just tried some other way and was able to get the Latest Email only. Here are the steps

 

  • Every Email will have a separator which can be either a Line or Multi Tab etc., for Example in Outlook / O365 You will have a line which in HTML refer to this 

 

<div style="border:none; border-top:solid #E1E1E1 1.0pt; padding:3.0pt 0in 0in 0in">​

 

  • Here is what I did, Step 1
     

Michael_Anton_F_0-1632816095525.jpeg

 

 

  • Initialize Variables which we call the Delimiter, Body of the Message and Latest ResponseMichael_Anton_F_1-1632816096154.jpeg

     

     

    Michael_Anton_F_2-1632816095706.jpeg

     

     

    Michael_Anton_F_3-1632816095707.jpeg

     

     

  • Finally we call the split function with [0] which gives us the First Email as below. I use this 

 

split(variables('EmailBody'),variables('Delimiter'))[0]​

 

Michael_Anton_F_4-1632816095717.jpeg

 

 



View solution in original post

1 REPLY 1
Michael_Anton_F
Frequent Visitor

Found it myself, Message 5 has the solution:
https://powerusers.microsoft.com/t5/Building-Flows/Extract-only-the-text-from-the-latest-reply-in-an...

I just tried some other way and was able to get the Latest Email only. Here are the steps

 

  • Every Email will have a separator which can be either a Line or Multi Tab etc., for Example in Outlook / O365 You will have a line which in HTML refer to this 

 

<div style="border:none; border-top:solid #E1E1E1 1.0pt; padding:3.0pt 0in 0in 0in">​

 

  • Here is what I did, Step 1
     

Michael_Anton_F_0-1632816095525.jpeg

 

 

  • Initialize Variables which we call the Delimiter, Body of the Message and Latest ResponseMichael_Anton_F_1-1632816096154.jpeg

     

     

    Michael_Anton_F_2-1632816095706.jpeg

     

     

    Michael_Anton_F_3-1632816095707.jpeg

     

     

  • Finally we call the split function with [0] which gives us the First Email as below. I use this 

 

split(variables('EmailBody'),variables('Delimiter'))[0]​

 

Michael_Anton_F_4-1632816095717.jpeg

 

 



Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

New Process Advisor Capabilities carousel.png

Read the blog for the latest news

Read the latest about new experiences and capabilities in the Power Automate product blog.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

Users online (2,001)