Showing results for 
Search instead for 
Did you mean: 

Excel Attachment from Email to File Folder Corrupt



I'm having trouble scraping an email and depositing the excel file into a file folder with a new name. 


Here's my first step: 



And then the second: 



In the screenshot above, I just have attachments as the input for the apply to each.


Second continued: 



In the compose I created the following for the filename: 



And for the file content, I used the dynamic content type: "Attachments Content"


Executing the flow now deposits the file where I want (and about the same size), but it's corrupt when oppened. 



^This is correct!




^This is sad! 


I've tried looking through old posts, but I'm not seeing anything obviously in error. Does anyone have any suggestions?


Community Support
Community Support

Hi @AlejandroPNW ,

This error message is encountered in the following scenarios:

  • The file is not compatible with the Excel-version
  • The file has become corrupt or damaged

Please change concat('upload''.''xlsx') to concat('upload', '.', 'xls') and try again.

Best Regards

If my solution helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks for the suggestion, but the file is still coming out strangely. 


In this case I can open it, but when I do this is the result: 



The true result should be a fairly simple table of data. 


Helpful resources

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (1,857)