Skip to main content

Notifications

Power Automate - General Discussion
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!

  • EC_88 Profile Picture
    EC_88 2 on at
    Re: 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

    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? 

  • aanwar Profile Picture
    aanwar 10 on at
    Re: 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

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

  • Verified answer
    SamLed Profile Picture
    SamLed 2,326 on at
    Re: 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

    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
    aanwar 10 on at
    Re: 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

    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/

  • SamLed Profile Picture
    SamLed 2,326 on at
    Re: 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

    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
    aanwar 10 on at
    Re: 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

    Hey SamLed,

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

  • SamLed Profile Picture
    SamLed 2,326 on at
    Re: 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

    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.

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,508

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,839

Leaderboard