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

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Get Text from .EML Body

(1) ShareShare
ReportReport
Posted on by 2

The deceptively challenging problem here is that I can use the  "base64tostring" action to get the header information from the .eml file. However, eml files of a certain? size and those with attachments appear to be encoded -- maybe mime? The header information is decoded, however the body of the eml file remains encoded/encrypted. We need to be able to do a substring search of the body of the eml file. This ability is a core need within a larger framework of processing messages involving Purview, SPO, and other business process automation. Because of other mechanisms and volume, we can't go directly to the mailboxes to get the email. We also considered orchestrating content searches after a DLP detection occurred, but it comes at the cost of timing/duration before the content is available to be searched. While not security-related, the logic we must apply to the eml file is beyond what can be done via Purview.

 

What are some methods to open an EML file in Automate (not PAD) and get the text of the body of the email file where the text appears to be encoded? BTW, we believe this is happening when the Teams to SPO email connector writes the file. Emailing to a teams channel was the way we determined to be able to create the files. Essentially a trigger sends emails to Teams which writes to SPO and we process from there. Open to change this if there is a better way. 🙂

 

Appreciate your help. Truly is a great community here!

I have the same question (0)
  • Verified answer
    v-jefferni Profile Picture
    on at
    Re: Get Text from .EML Body

    Hi @SeizeTheDay ,

     

    Please try and use a Compose operator to convert .eml file content to HTML text, and then use Html to text converter to make it plain texts:

    vjefferni_0-1671604222471.png

    base64ToString(outputs('Get_file_content')?['body']?['$content'])

     

    Best regards,

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

Coming soon: forum hierarchy changes

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

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 535 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 348 Moderator

#3
developerAJ Profile Picture

developerAJ 262

Last 30 days Overall leaderboard