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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Email attachment decod...
Power Automate
Unanswered

Email attachment decoding?

(0) ShareShare
ReportReport
Posted on by 5

I have a really simple flow that takes an email attachment and sends an HTTP POST with the attachment contents in the body. 

ms_admin_0-1595279575436.png

 

The email attachment is a simple text file that just says the word "test"

Why do the contents come through like below?

 

image.png

If I don't use a string variable and simple send "Attachment Contents" in the HTTP body, it comes through just as strange

image.png

What is the proper way to use text attachment contents in a flow without the encoding messed with? Thanks a ton, 

Categories:
I have the same question (0)
  • Verified answer
    v-litu-msft Profile Picture
    on at

    Hi @ms_admin,

     

    The content of the received attachment is base64 code, if you want it to display readable, you could use the base64ToString() function convert it into string, for example:

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

    Annotation 2020-07-21 162027.jpg

     

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • ms_admin Profile Picture
    5 on at

    Thank you so much, this helped.

     

    It also turned out an image in my signature was being sent as an attachment while testing making things even more confusing. 

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

Forum hierarchy changes are complete!

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

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard