cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
72Zib
Helper I
Helper I

Corrupted .XLSX or CSV File When Being Saved From Outlook

Hi,

 

I am getting corrupted file error when saving to OneDrive or SharePoint from outlook, I did try  

base64ToBinary(items('Apply_to_each')?['contentBytes'])

but the template will not let me save, please help

72Zib_0-1633134211440.png

Thanks Z

1 ACCEPTED SOLUTION

Accepted Solutions
ekarim2020
Community Champion
Community Champion

Let's start at the beginning when a new email arrives containing one or more file attachments. We will ensure that the attachments are properly save to OneDrive and SharePoint:

2021-10-02_20-42-12.jpg

We will use a loop to save each file attachment to OneDrive and SharePoint.  We use two loops, one for Value (Apply to each) because it is an array and stores the Outlook message, and another loop (Apply to each 2) to iterate through all the attachments in the email:

2021-10-02_20-45-03.jpg

The above content can be entered as dynamic content, from the When a new email arrived (V3) action:

2021-10-02_20-56-13.jpg

 

ekarim2020_0-1633207364726.png

Try the above and let me know how you get one.


Ellis


____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

4 REPLIES 4
ekarim2020
Community Champion
Community Champion

Try the following expressions to get the file content and save to SharePoint:

2021-10-02_18-22-59.jpg


Ellis

 


____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.

Hi I am getting error message with this string, any idea why?

72Zib_0-1633197101184.png

72Zib_1-1633197114048.png

 

ekarim2020
Community Champion
Community Champion

Let's start at the beginning when a new email arrives containing one or more file attachments. We will ensure that the attachments are properly save to OneDrive and SharePoint:

2021-10-02_20-42-12.jpg

We will use a loop to save each file attachment to OneDrive and SharePoint.  We use two loops, one for Value (Apply to each) because it is an array and stores the Outlook message, and another loop (Apply to each 2) to iterate through all the attachments in the email:

2021-10-02_20-45-03.jpg

The above content can be entered as dynamic content, from the When a new email arrived (V3) action:

2021-10-02_20-56-13.jpg

 

ekarim2020_0-1633207364726.png

Try the above and let me know how you get one.


Ellis


____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

Thanks for this excellent explanation. This works great.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (2,903)