Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Unanswered

Text document from outlook is saving to SharePoint in gibberish via PA flow

(0) ShareShare
ReportReport
Posted on by 4

Hi, I'm having an issue with a power automate flow that is taking a text document from outlook and saving it to SharePoint. The email attachment is a text document in notepad and is displaying as expected. However, when the file is saved in SharePoint via the flow, it's saving in gibberish (below screenshot).

 

Tanisha_0-1702409529121.png

 

This is my current flow, which is working fine for another text file, I'm just not sure why it's not working for this file. 

Tanisha_1-1702409950336.png

Tanisha_2-1702409969114.png

Tanisha_3-1702409984030.png

Tanisha_4-1702410001355.png

Any help would be greatly appreciated, thank you! 

  • Tanisha Profile Picture
    4 on at
    Re: Text document from outlook is saving to SharePoint in gibberish via PA flow

    Hi Scott, There is no image in the email, however the attachment is in a zipped folder. Could that be the reason it's saving corrupted? The file extension in the zipped folder is .txt and when opened via the email it isn't corrupted, but my workflow is saving it to Sharepoint as corrupted. Should I have a step in the workflow to unzip the folder? 

     

    Thanks,

    Tanisha 

  • ScottShearer Profile Picture
    25,208 Most Valuable Professional on at
    Re: Text document from outlook is saving to SharePoint in gibberish via PA flow

    @Tanisha 

    If the email that you receive has an image, for example in the signature block, that image is considered an attachment.  Is that possibly your issue?

    How many loops ran in your Flow when an email was received?  If there is more than 1, then the issue may be what I described.  You can test to see if the attachment file extension is .txt before you create the file.

     

  • Tanisha Profile Picture
    4 on at
    Re: Text document from outlook is saving to SharePoint in gibberish via PA flow

    Hi @ScottShearer

     

    Thank you for the quick reply. I tried both of the suggestions offered in that solution with no success. It did change the file output in SharePoint but just into a different looking gibberish. Any thoughts based on the changes I tried making to my flow shown below? 

     

    Tanisha_0-1702412417350.pngTanisha_1-1702412487802.pngTanisha_2-1702412503828.png

     

    Thank you,

    Tanisha 

  • ScottShearer Profile Picture
    25,208 Most Valuable Professional on at
    Re: Text document from outlook is saving to SharePoint in gibberish via PA flow

    @Tanisha 

    Please see this post as I believe that it provides a solution.

    You need to use the base64ToBinary() expression and use the file content as the input - the post explains how.

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,653 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,999 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow