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 / File keep getting corr...
Power Automate
Unanswered

File keep getting corrupted when attaching to email

(0) ShareShare
ReportReport
Posted on by

I'm new to Power Automate and am attempting to attach a content file to an email. However, when the email is received, the attachment appears to be corrupted. Initially, the email attachment seems to be a PDF file, as intended, but upon opening, it does not appear as such. To identify the problem, I've created a simple flow, but I'm at a loss for an explanation.

Screenshot_17.png
Screenshot_14.png
Screenshot_15.png
Categories:
  • Ellis Karim Profile Picture
    12,377 Super User 2026 Season 2 on at

    Hi @SkyPixelWandere ,

     

    Add the file extension to the filename and reformat the array as shown below, then retest the flow:

    Screenshot_14.png

    And I think the format of the attachment array needs to be:

     

    [
     {
     "name": "<filename with extention",
     "contentBytes": {
     "$content-type": "<content-type>",
     "$content": "<content>"
     }
     }
    ]

     

     

    See: 📝Best Practices for Formatting File Attachment Arrays in Approvals, Outlook Emails, OneDrive, and SharePoint – Ellis Karim's Blog


    Ellis
    ____________________________________
    If I have answered your question, please mark the post as ☑️ Solved.
    If you like my response, please give it a Thumbs Up.
    My Blog Site

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 377

#2
11manish Profile Picture

11manish 302 Super User 2026 Season 2

#3
Henil Profile Picture

Henil 130

Last 30 days Overall leaderboard