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

2 REPLIES 2
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

 

 



I have an issue with this function: 

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

Give me an alarm that it is not valid function, what shall I do?

And after all, how I can post the Mail which I split into teams chat?

HagerMohamed_0-1669202985184.png

 

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (3,970)