Showing results for 
Search instead for 
Did you mean: 
Helper IV
Helper IV

Created Excel File is corrupt


I'm building a workflow that does the following:

1) The flow is trigger when email with specific subject and contains attachment arrives to shared mailbox

2) Once the email arrives, the workflow saves the XLSX file to a SharePoint folder


What I have noticed is that the file gets created, but the size is less than the original file. When I try to open the created file, I get a message that it's a corrupt file.


The same flow I use it to save another file, and it works. Also, if I go to the email and do "Save As" to the file, it saves properly.


I'm thinking the file might have some property that causes this (e.g. if it's read/only)










Community Support
Community Support

Hi @yjamous 


I was testing the same flow that you attached and noticed the same issue so I added the "Get Attachent(V2)" action and it seems to be working now, you can test it, should look like this. 




Hope this helps. 

Kind regards. 

Community Support Team - Anthony Amador

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


thanks @AnthonyAmador 

I tried it, but same issue. I'm wondering could it be related to some file properties?

Here is why I say so.

The process I follow is:

1) I receive the email

2) I forward the email with attachment to the shared mailbox

3) The flow works, but file gets corrupted.


Now if I do the following:

1) Download the attachment from the email

2) Create new email and attach the file

3) Run the flow.


The file is saved properly with no issues.


As far as I know, it shouldn't be a problem. 


I was reading a similar post and found that they had this same problem because in the "Include Attachments" drop down menu in the trigger they had selected No, can you check that? 


Let me know if that helps. 


Same thing

Whether I put Yes, No or even leave it blank, same behavior.



Helper IV
Helper IV

Hi @AnthonyAmador 

This is what I'm suspecting causing the issue.

When I open the attachments in the email I receive in the shared mailbox, it shows "Protected View".

So, when I save the file and then compose new email and send it, then the file is saved in SharePoint folder properly.


How can I overcome the "Protected View" issue?







Community Support
Community Support

Hi @yjamous 


I tested it with a protected view Excel file and it worked without issue so I don't think that's the problem. 

What is Protected View? (


Can you share the entire flow? What trigger are you using? 




Thanks @AnthonyAmador 

Here are the screenshots







Helpful resources

2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,414)