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
October Events

Mark Your Calendars

So many events happening this month - don't miss out!

 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (3,556)