Skip to main content

Notifications

Power Automate - Building Flows
Unanswered

How to read content of an email attachment - html format

Posted on by

Hi Folks,

 

I have a scenario where I have to read the contents of an html file via power automate. The file arrives as an attachment of an email. I'm able to get the attachment and the content bytes. How do I get the actual content  (html) inside the file? I need to parse through the same and produce filtered output.

 

Is it possible with power automate? Could you please provide any suggestions?

 

The below is what I have built so far and output of attachment body:

 

rbn_nue_0-1657194425105.png

 

 

rbn_nue_1-1657194488763.png

 

Thank you. 

  • rbn_nue Profile Picture
    rbn_nue on at
    Re: How to read content of an email attachment - html format

    Hi @Shujaath_Khan ,


    Thank you for the response. I tried your suggestion. I received the below output:

     

    rbn_nue_0-1657196506693.png

     

    Any method to fix this?

  • Shujaath_Khan Profile Picture
    Shujaath_Khan 1,111 on at
    Re: How to read content of an email attachment - html format

    Hi @rbn_nue 

    you can try below expression to read all text content from html file

    base64ToString(outputs('Get_Attachment_(V2)')?['body/contentBytes'])

    Shujaath_Khan_0-1657194956558.jpeg

     

    ref here

     

    Thanks

    Please click Accept as Solution on this reply if it helped to solve your issue, and thumbs-up if you feel this is useful or important in other ways as a boost.

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,246

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,884

Leaderboard