web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Excel file uploaded by...
Power Automate
Unanswered

Excel file uploaded by flow to SP is corrupt

(0) ShareShare
ReportReport
Posted on by 21

I have a simple flow that's supposed to upload an email attachment based on certain conditions. The below flow finishes successfully but when I download and open the files uploaded on Sharepoint, the file ends up corrupt. Am I selecting the wrong output from the flow trigger?

 

olimilo_0-1655865721257.png

 

Categories:
  • 365-Assist Profile Picture
    2,327 Moderator on at

    In File Name use the Attachment filename

    365Assist_0-1655874304094.png

    ---------------------------------------------------
    Please Accept as Solution if it solves your question. Or just give it a Thumbs Up if it is helpful as can help others.

    Subscribe: https://www.youtube.com/channel/UCFpvUlpx84FuIPOdInGKMTw
    Twitter: https://twitter.com/assist_365

    Regards
    Darren Lutchner - 365 Assist

  • RI-18060338-0 Profile Picture
    21 on at

    Unfortunately, we can't use the attachment's original file name as we have to rename the file to a custom file name.

  • 365-Assist Profile Picture
    2,327 Moderator on at

    My suggestion is to save the file with its attached file name then in the same flow you can rename the file in SP.

     

    Here is a good blog article that explains how to rename the file How to rename files in SharePoint with Power Automate (pnp.github.io)

     


    ---------------------------------------------------
    Please Accept as Solution if it solves your question. Or just give it a Thumbs Up if it is helpful as can help others.

    Subscribe: https://www.youtube.com/channel/UCFpvUlpx84FuIPOdInGKMTw
    Twitter: https://twitter.com/assist_365

    Regards
    Darren Lutchner - 365 Assist

  • RI-18060338-0 Profile Picture
    21 on at

    This seems like a pretty odd way of doing things (also, oddly enough I can't get the thing to work even after following the tutorial).

     

    At the moment, we have a different flow that accomplishes the same thing without having to rename the file and we're trying to improve it since we got a notification saying "Slow Performance". That said, I'm no longer aware what version the "On email with attachment" trigger that flow is using, but will that flow eventually break?

  • ScottShearer Profile Picture
    25,331 Most Valuable Professional on at

    @olimilo 

    If the issue that you want to address is the corrupt file, you might want to use the base64ToBinary() expression.  Here is a link to a blog post that explains how.

     

  • iamankz Profile Picture
    2 on at

    @ScottShearer - if i put base64ToBinary() i am not getting the content option to pick.How to fix this?

  • dineshgawde Profile Picture
    6 on at

    Use base64ToString('') function in file content field from expression and AnyYourFileName.xlsx (You can use concate function with formatDateTime function for date specific file name)in File Name field of Create file action, it will create blank excel file(Without any corruption) in SharePoint (online). After 'create file' action add 'create table' and Add row into table actions.

     

    dineshgawde_0-1681821661923.png

     

    20230418_174858.jpg

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 289

#2
11manish Profile Picture

11manish 288 Super User 2026 Season 2

#3
Henil Profile Picture

Henil 125

Last 30 days Overall leaderboard