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 / when i save pdf file w...
Power Automate
Answered

when i save pdf file with power automate in sharepoint then i get this message hmm looks like this file doesn't have a preview

(0) ShareShare
ReportReport
Posted on by 10

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!

Categories:
I have the same question (0)
  • SamLed Profile Picture
    2,338 Moderator on at

    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.

  • aanwar Profile Picture
    10 on at

    Hey SamLed,

    Just a heads up, I'm not using the new designer. Thanks for the tip, though!

  • SamLed Profile Picture
    2,338 Moderator on at

    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.

  • aanwar Profile Picture
    10 on at

    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/

  • Verified answer
    SamLed Profile Picture
    2,338 Moderator on at

    Hi @aanwar,

     

    Use base64ToBinary() function on attachments ContentBytes:

    SamLed_0-1710185745747.png

    ______________________________________________________________

    If I have answered your question, please Accept the post as solution.
    If you like my response, please Thumbs Up.

  • aanwar Profile Picture
    10 on at

    Hi @SamLed, Thanks for investing your time and effort into this. Utilizing the base64ToBinary() function on the attachments' ContentBytes has done the trick.

  • EC_88 Profile Picture
    2 on at

    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? 

    Screenshot 2024-05-17 141036.jpg
    Screenshot 2024-05-17 141601.jpg
    Screenshot 2024-05-17 140248.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

Forum hierarchy changes are complete!

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

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 291 Super User 2026 Season 1

#2
David_MA Profile Picture

David_MA 238 Super User 2026 Season 1

#3
Power Platform 1919 Profile Picture

Power Platform 1919 109 Super User 2026 Season 1

Last 30 days Overall leaderboard