How do I get forwarded email body in group mail using logic app?

CaiAnqi-9995 0 Reputation points
2024-01-31T03:16:17.3633333+00:00

I have a logic app that is triggered when a new email arrives to a group and it is supposed to save the email body content as html file to a SharePoint folder. However, many of the emails in the group mailbox are forwarded messages are like this: Screenshot 2024-01-31 111014

And when I tried to use the "Get a thread post" action to extract the email body, it only extracted the empty message from the forwarder: User's image

How should I configure my logic app such that it is able to save the entire email, including the forwarded message to SharePoint?

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,110 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. MayankBargali-MSFT 70,401 Reputation points
    2024-01-31T11:56:14.8833333+00:00

    @CaiAnqi-9995 Thanks for reaching out.

    You need to leverage the Export email (V2) action and pass the message ID from your trigger and then leverage the SharePoint action as per your need. In my case I have used the Create File action and passed the Body of my Export email (V2) action in the File content of Create file action.

    User's imageIn case if you are only looking for the text content and not the full email then please let me know. As the above will save all the attachments screenshot etc. in your email and save it as the eml file or any extension as per you have defined.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.