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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Get Text from .EML Body
Power Automate
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!

Categories:
I have the same question (0)
  • Verified answer
    v-jefferni Profile Picture
    Microsoft Employee on at

    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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 570

#2
Valantis Profile Picture

Valantis 405

#3
11manish Profile Picture

11manish 350

Last 30 days Overall leaderboard