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 / 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.

Categories:
I have the same question (0)
  • Ellis Karim Profile Picture
    11,681 Super User 2025 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

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