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

 

 



View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (2,361)