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).
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.
Any help would be greatly appreciated, thank you!
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
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.
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?
Thank you,
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.
WarrenBelz
146,653
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,999
Most Valuable Professional