Hello,
Is it possible to extract only the latest response in an email thread instead of the entire body?
For my scenario, I need to act upon each reply to an email thread with only the content from the latest response.
Thanks!
Hi @shaykalyan,
I am not sure with your scenario, do you want to get the content from the email every time a you get a reply?
Could you show me more details on your scenario for better understanding.
Best regards,
Mabel Mao
Hi Mabel,
Sure, I'll try to describe further what I'm after. In my scenario, I would like to use the content from the latest email response in an email thread. I know that there is the "Body" dynamic content, however, for email threads with multiple responses, the "Body" content will contain replies from earlier responses as well as the latest response.
For example, here is the Body from a new email:
"""
Initial mail content
"""
Then someone replies to the thread. The dynamic Body is now:
"""
Reply content
---------------------------------------
TO: ....
CC: ....
Subject: ...
---------------------------------------
Initial mail content
""""
The next reply to the thread will again have all of the history from the email in the dynamic Body variable.
What I would like to get is only the latest response in the thread and not all the other responses as well. Is this possible without doing manual string manipulation?
Thanks!
Hi, I am working on the same thing, I want to extract only the latest reply (exclude all the original body of the email). Can anyone help? Thanks!
@shaykalyan wrote:Hello,
Is it possible to extract only the latest response in an email thread instead of the entire body?
For my scenario, I need to act upon each reply to an email thread with only the content from the latest response.
Thanks!
I just tried some other way and was able to get the Latest Email only. Here are the steps
<div style="border:none; border-top:solid #E1E1E1 1.0pt; padding:3.0pt 0in 0in 0in">
split(variables('EmailBody'),variables('Delimiter'))[0]
In my case I've used a different solution.
When I get an email:
I first convert the email body using "HTML to text" action:
An example of an email converted would be:
Test body email.
Thanks,
Mark
From: Paul <Paul@mycompanyname.com>
Sent: 11 November 2021 15:42
To: Mark <mark@mycompanyname.com
Subject: Subject email test
...
So if I split the output from my conversion above with the word 'From:' and on the same expression I get the first element from my array ([0]) it will result on the latest email. 😀
How would you go about removing from the output, any content that is above the message body, that is automatically put in by the system generating the email? Salesforce does this when emails are received in a Case, and a notification is sent to the team that said email has been received in the Case. Screenshot example below. I have highlighted the text to indicate what I only want to extract from the email, regardless of how long or short the highlighted text could be. Of course, blacked out private info. Thank you for the help! -Brad
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Announcing a new way to share your feedback with the Power Automate Team.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
72 | |
27 | |
22 | |
15 | |
13 |
User | Count |
---|---|
141 | |
43 | |
42 | |
34 | |
30 |