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)
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.
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.
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.
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?