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 / Power Automate Corrupt...
Power Automate
Suggested Answer

Power Automate Corrupts Email (Excel) Attachments Saved or Copied to SharePoint

(0) ShareShare
ReportReport
Posted on by 2

I'm running into an issue with a Power Automate flow and hoping someone here has seen this before or has a workaround.

Here's what my flow does:

  • It monitors a shared inbox for incoming emails with attachments.
  • It filters attachments by name and saves them to a SharePoint folder using the Create File connector.
  • In the screenshot of my flow, there's a Delay action currently acting as a placeholder to mark where additional tasks will be added later.
  • After the delay, the flow includes a step that copies the file to another folder.

The problem: When I try to open the Excel file after this process, it shows an error and won’t open properly. Here's the screenshot of the error message:


The complete flow with Create File parameters:



Any tips on how to avoid this? Thanks!


Categories:
I have the same question (0)
  • Michael E. Gernaey Profile Picture
    53,963 Moderator on at
     
    A couple of things.
     
    Primary questions / thoughts
    You need loop through attachments
    You need to have a Get Attachment (where is that at?) as I expect your Dynamic names to be in Caps
     
    What is the file attachment?
     
    How long is your Delay? Make sure its 10 minutes
     
    Here is a good walkthrough I would verify as I see missing items in yours
     

    If these suggestions help resolve your issue, Please consider Marking the answer as such and also maybe a like.

    Thank you!
    Sincerely, Michael Gernaey
  • Michael E. Gernaey Profile Picture
    53,963 Moderator on at
     
    Just checking in on this.
  • TR-11092140-0 Profile Picture
    2 on at
    @Michael E. Gernaey The file attachment is a mix of different file types. The flow filters a target file having ".xlsx" as the extension.

    After several attempts in running the same flow, it seems like the error has something to do with Excel and not the flow. In the current flow, it does loop through the attachments in the Foreach block.

    In some iterations, the output attachment file opens without throwing this error but sometimes it does popup. Not sure if something happens "in-memory" that causes Excel to show that error sometimes.
  • Suggested answer
    Ellis Karim Profile Picture
    12,122 Super User 2026 Season 1 on at
     
    Here is another option to try:
     
    A work around to the issue is to use a compose action to store the file content type and file content. Then use the output of the Compose action for the File Content in the SharePoint Create file action:
     
     
    Ellis Karim
    Ellis Karim
    elliskarim.com  |  LinkedIn  |  Bluesky
    If this solved your issue, please mark it as ✅ Accepted Answer. If it helped, feel free to give it a 🩷 Like!
  • Building with Why Profile Picture
    351 Moderator on at
    @TR-11092140-0 is this in production?  I ask because when testing it is common (I do this all the time) to re-run the flow until it passes.  
     
    The problem is that the Power Automate connector for Outlook does not save the file correctly/well.  This is to say, if you are re-running the flow the flow will work, but the file will be corrupted.  Trigger the flow fresh and see if the file is corrupted.
     
    If this helped, please mark as answered and like this response.
     

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 458

#2
Vish WR Profile Picture

Vish WR 345

#3
David_MA Profile Picture

David_MA 261 Super User 2026 Season 1

Last 30 days Overall leaderboard