cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

Corrupted Excel File When Being Saved From Outlook

Hi,

 

I am trying to create a simple process to save all emails that come with attachments onto a specific folder on OneDrive. Every time this process works, it seems to create the file, but it is corrupt, and the file size becomes 1-3 KB. The original excel files that are being emailed are .xlsx. Am I doing anything wrong here?

 

 
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Corrupted Excel File When Being Saved From Outlook

 

Hi @Andrew17 ,

 

Please consider using the following configuration to first check if the type of the original file in the attachment is as expected.

61.PNG

It is also recommended that you check whether the attachment you added can be opened normally before testing.

Please take a try.

 

Best Regards,

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

View solution in original post

5 REPLIES 5
Highlighted
Regular Visitor

Re: Corrupted Excel File When Being Saved From Outlook

Corrupted Excel2.jpgPower Automate Flow.PNG

Highlighted
Dual Super User III
Dual Super User III

Re: Corrupted Excel File When Being Saved From Outlook

Hey @Andrew17 

 

Can you share details on what you are passing in the file content for the create file action? can you check if it is a base 64 string or something else? based on that you might have to change the config a little to make this work. 

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Highlighted
Regular Visitor

Re: Corrupted Excel File When Being Saved From Outlook

Hi @yashag2255,

 

The content in the files is just text. There are no special characters in it as well. Just to test it out, I set up to receive a .xlsx file with only the word "text" in a cell, and the same thing happened. Is this what you were asking?

Highlighted
Community Support
Community Support

Re: Corrupted Excel File When Being Saved From Outlook

 

Hi @Andrew17 ,

 

Please consider using the following configuration to first check if the type of the original file in the attachment is as expected.

61.PNG

It is also recommended that you check whether the attachment you added can be opened normally before testing.

Please take a try.

 

Best Regards,

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

View solution in original post

Highlighted
Helper I
Helper I

Re: Corrupted Excel File When Being Saved From Outlook

I'm having this exact same problem, but I noticed now that it seems to only be a problem when I'm testing a flow "using data from previous run".  When I do a fresh test from Outlook, it stored working files for me.

When the problem does occur, I observe that the files can be opened in the original email. And they will still work if I use File Explorer to drag them to a folder.  But if they are saved by Flow, the files are not able to be opened with an error "Excel cannot open the file name.xlsx because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file."

 

The file does match the format, it's a XLSX file. But something about flow is corrupting it from being saved. I'm using the default "save o365 attachments to OneDrive Business" flow and the create-file step is set to use 

Helpful resources

Announcements
Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Users online (5,723)