Skip to main content

Notifications

Community site session details

Community site session details

Session Id : J7Ez577i9BGpslmuLRtezv
Power Automate - General Discussion
Answered

Power Automate Attachments Are Corrupt

Like (2) ShareShare
ReportReport
Posted on 9 Jan 2024 14:06:15 by 104

Hi,

 

@trice602 

 

I am trying to build a flow that will share our organizations scorecard every Monday at 8:00 a.m. The Excel document is located in Sharepoint with a specific Microsoft Teams group. I fairly new to flows but have created many utilizing Lists. This is my first flow trying to attach documents. I tried following other forum posts and ended up on the flow below. While the email does send when tested, the attachment is corrupt and won't open properly.

 

martzj_0-1704808852480.png

 

martzj_1-1704808928059.png

 

martzj_2-1704808966493.png

 

martzj_3-1704809047475.png

 

martzj_4-1704809070450.png

 

 

 

  • Stefan51 Profile Picture
    3 on 11 Sep 2024 at 15:49:49
    Power Automate Attachments Are Corrupt
    The post responses were very helpful on this issue, that's for sure! I wanted to add a parallel solution that others may find helpful in the future.
     
    When adding multiple attachments to an array for an EMAIL, the array must contain
    {
    "Name": "DisplayName of file attaching before the apply to each",
    "ContentBytes": body(get_attachment_content) within the apply to each
    }
     
    When adding multiple attachments to an array for APPROVALS, the array must contain
    {
    "Name": "DisplayName of file attaching before the apply to each",
    "Content": body(get_attachment_content) within the apply to each
    }
     
    Notice the "Content" lines in the arrays are different for each service you are using. AND notice the lack of double quotes on the Content item - this ultimately fixed the problem I was having.
  • TN-27081350-0 Profile Picture
    2 on 27 Aug 2024 at 13:56:37
    Power Automate Attachments Are Corrupt
    Super helpful post!1
     
    I had the following FLOW and it was downloading 1KB files (corrupt) - they are bigger in reality (Under New Designer)
     
    After balling my eyes out & then coming across this post, the Old Designer works perfectly
     
    My FLOW Triggers when an email is flagged (V3)
     
    Then Get Attachment (V2)
     
    Then for each I create file (Share Point)
  • gstavropoulos Profile Picture
    4 on 16 May 2024 at 13:38:51
    Re: Power Automate Attachments Are Corrupt

    Latest update:

    The updated filename is correct now (from Sharepoint) but it is still shown as corrupt when I am trying to open it as a mail attachment. I tried the previous recommended attachment formats but didn't work.

  • gstavropoulos Profile Picture
    4 on 15 May 2024 at 12:24:32
    Re: Power Automate Attachments Are Corrupt

    Hi all!

    my case is that the attachment inside my e-mail doesn't have a unique name, it is dynamic, and it is supposed to be uploaded by a different user each time.

    When i m trying to test with my own onedrive/sharepoint attachment i am still getting the corrupt file error ( when i open the email attachment i notice that the attachment file name is changed by default, i guess because it is saved in onedrive/sharepoint). How can i fix this issue?  Ideally it should attach from different users each time.

    Can you please advise accordingly?

    Many Thanks in advance 

  • bsfegade Profile Picture
    60 on 11 Apr 2024 at 09:15:46
    Re: Power Automate Attachments Are Corrupt

    @marmar @trice602  New designer adds extra double quote when filecontent is selected.
    if we remove extra double quote, it works in new designer too

    bsfegade_3-1712826940144.png

     

  • bsfegade Profile Picture
    60 on 11 Apr 2024 at 09:13:43
    Re: Power Automate Attachments Are Corrupt

    This works in new designer too

    bsfegade_2-1712826816207.png

     

  • bsfegade Profile Picture
    60 on 11 Apr 2024 at 09:12:13
    Re: Power Automate Attachments Are Corrupt

    This works in new designer too.

    bsfegade_0-1712826695336.png

     

  • Myovanni Profile Picture
    3 on 20 Feb 2024 at 22:13:16
    Re: Power Automate Attachments Are Corrupt

    I have de same problem in all your steps, thank you for resolve

  • Nivedhana Profile Picture
    45 on 24 Jan 2024 at 11:39:26
    Re: Power Automate Attachments Are Corrupt

    I was facing the exact same problem and switching to old designer and recreating the flow worked for us. Thanks!

  • trice602 Profile Picture
    13,768 Super User 2025 Season 1 on 09 Jan 2024 at 17:26:08
    Re: Power Automate Attachments Are Corrupt

    Nice!  It's not you, it's the new designer still getting developed/repaired.  When in doubt, go to classic and verify.  I LOVE the new designer but as the old saying goes, "trust but verify".

     

    I have also spent hours trying to figure out something basic and simple before.  Now I go to classic immediately on errors that I know should not occur.

     

     

     

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - General Discussion

Overall leaderboard