cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Sgeater01
New Member

Office 365 attachment to onedrive for business/SharePoint

Hi,

I have seen a number of people with a similar issue & some solutions given, but they don't seem to fix the issue for me.

 

Please see my simple flows below; they both work but I can't open the files as they end up corrupted somehow. This is the same if I try to save the attachment to one drive for business or SharePoint. I have had chunking both on and off. Any Ideas?

 

corrupt.JPG

flow 1_LI (3).jpgflow 2.JPG

flow 3_LI (2).jpg

1 ACCEPTED SOLUTION

Accepted Solutions
tom_riha
Super User
Super User

Hello @Sgeater01 ,

try to apply the base64toBinary(...) expression on the 'Content Bytes'/'Attachments Content' when using it as the 'File Content'. The attachments from emails have sometimes different encoding than SharePoint/OneDrive expects and encoding them to binary might help.

And you're using fixed file name with .xlsx extension, is the email attachment really an Excel file? And is it only one attachment?



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

View solution in original post

2 REPLIES 2
tom_riha
Super User
Super User

Hello @Sgeater01 ,

try to apply the base64toBinary(...) expression on the 'Content Bytes'/'Attachments Content' when using it as the 'File Content'. The attachments from emails have sometimes different encoding than SharePoint/OneDrive expects and encoding them to binary might help.

And you're using fixed file name with .xlsx extension, is the email attachment really an Excel file? And is it only one attachment?



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

Thanks @tom_riha Your advice worked. I'm very grateful.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (4,830)