Hey there,
I've got a two-step flow set up. The trigger is "Office 365 Outlook – When A New Email Arrives In A Shared Mailbox (V3)", followed by a "Create file" action that saves attachments to SharePoint. The flow seems to be running smoothly, but when I try to open the saved file from the SharePoint library, I encounter an error saying, "Hmm, looks like this file doesn't have a preview."
Interestingly, everything works just fine when I use the "When A New Email Arrives V3" trigger instead. All other settings remain the same. I've also been following Matthew Devaney's article https://www.matthewdevaney.com/power-automate-save-email-attachments-to-sharepoint-library/. Any ideas on what might be causing this hiccup?
Appreciate any insights you might have!
Hi,
First off, my knowledge of this is very limited. I'm experiencing the same issue as @aanwar. I'm trying to create a 2 step flow which saves the PDF attachment of an email to SharePoint.
I've trying to use the base64ToBinary() function as advised by @SamLed but I keep getting errors thrown back. The errors are either - no parameters are allowed or if I remove parameters, the error is Null or expecting something else.
I've also tried amending 'Apply_to_each' to 'For_each' as I thought it may be the naming convention of the step before Create File part.
Where am I going wrong / missing?
Hi @SamLed, Thanks for investing your time and effort into this. Utilizing the base64ToBinary() function on the attachments' ContentBytes has done the trick.
Hi @aanwar,
Use base64ToBinary() function on attachments ContentBytes:
If I have answered your question, please Accept the post as solution.
If you like my response, please Thumbs Up.
Hi @SamLed,
I appreciate you taking the time to assist with this. I'm still getting the hang of this area, so any additional information or guidance would be really helpful. Could you possibly share some resources, articles, or steps on how to convert base64 to a binary file? Do I need to include an intermediate action in Power Automate to achieve this?
Thanks in advance for your help!
My current flow is similar to flow given in this article https://www.matthewdevaney.com/power-automate-save-email-attachments-to-sharepoint-library/
Hi @aanwar,
Ok, so give a try converting file content from base64 to binary.
If I have answered your question, please Accept the post as solution.
If you like my response, please Thumbs Up.
Hey SamLed,
Just a heads up, I'm not using the new designer. Thanks for the tip, though!
Hi @aanwar,
If you're using new designer consider using old one and you won't get this issue.
If I have answered your question, please Accept the post as solution.
If you like my response, please Thumbs Up.