web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Get Email Body of last...
Power Automate
Unanswered

Get Email Body of last email

(1) ShareShare
ReportReport
Posted on by 21

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

Categories:
I have the same question (0)
  • Verified answer
    Michael_Anton_F Profile Picture
    21 on at

    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-email-thread/m-p/686732#M92582

    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

     

     



  • HagerMohamed Profile Picture
    2 on at

    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

     

  • Flejoyeux Profile Picture
    69 on at

    you can replace it by first(split(variables('EmailBody'),variables('Delimiter')))

     

    but the delimiter doesn't seems to work with my emails

  • newbie7 Profile Picture
    39 on at
    @Michael_Anton_F could you repost the pictures? the image has failed 
     
    thanks

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard