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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Corrupted .XLSX or CSV...
Power Automate
Unanswered

Corrupted .XLSX or CSV File When Being Saved From Outlook

(0) ShareShare
ReportReport
Posted on by 68

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

Categories:
I have the same question (0)
  • Ellis Karim Profile Picture
    11,681 Super User 2025 Season 2 on at

    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.

  • 72Zib Profile Picture
    68 on at

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

    72Zib_0-1633197101184.png

    72Zib_1-1633197114048.png

     

  • Verified answer
    Ellis Karim Profile Picture
    11,681 Super User 2025 Season 2 on at

    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.

  • 72Zib Profile Picture
    68 on at

    Thanks for this excellent explanation. This works great.

  • PBOBOP Profile Picture
    2 on at

    Hello Ellis @ekarim2020,

     

    I am trying to follow the steps you have laid out, but I can't seem to select "value" in the first loop. I only have the option to select "Attachments". Is there any reason why? How will it affect the end result?

    This is the first step

    PBOBOP_0-1711315908235.png

    and the loop:

    PBOBOP_1-1711315927252.png

     

  • Ellis Karim Profile Picture
    11,681 Super User 2025 Season 2 on at

    Hi @PBOBOP ,

     

    The fist thing to try is to enter the text Value into the Search box as shown. This should find the Value dynamic content:

    PBOBOP_1-1711315927252.png


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

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard