cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
yjamous
Helper IV
Helper IV

Created Excel File is corrupt

Hi

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)

 

 

yjamous_0-1638484741182.png

 

 

 

 

 

 

7 REPLIES 7
AnthonyAmador
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. 

 

AnthonyAmador_0-1638558900302.png

 

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. 

Cheers. 

Same thing

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

 

 

yjamous
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?

 

 

 

 

yjamous_0-1638574864417.png

 

AnthonyAmador
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? (microsoft.com)

 

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

 

Cheers.

 

Thanks @AnthonyAmador 

Here are the screenshots

 

yjamous_0-1638943366454.pngyjamous_1-1638943475690.png

 

yjamous_2-1638943573052.pngyjamous_3-1638943687119.png

 

 

Helpful resources

Announcements
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)