Skip to main content

Notifications

Community site session details

Community site session details

Session Id : EowpdSqS6/KqDizeNL8ZHO
Power Automate - Building Flows
Answered

saving a SharePoint library document thumbnail to an image file

Like (0) ShareShare
ReportReport
Posted on 6 Sep 2021 06:19:12 by

How can I save a thumbnail generated for a document in a SharePoint library to another library in SharePoint? I'm stuck on converting the automatically generated thumbnail into a file (e.g. jpg). 

I've tried using the URL (i.e. _layouts/15/getpreview.ashx?path=) but I'm not sure how to extract the content from what is generated at that URL. I've also tried variations on @{binary(outputs('Get_file_properties')?['body/{Thumbnail}/Large'])}.

My original flow uses a workaround where I copy from SharePoint to OneDrive because there is a simple Get File Thumbnail action for OneDrive in Power Automate, but that is problematic with other users.

Thanks in advance 🙂

  • mitasKM Profile Picture
    3 on 24 Oct 2023 at 13:35:15
    Re: saving a SharePoint library document thumbnail to an image file

    Worked perfectly fine! Thanks!!!

  • Youngbin Profile Picture
    2 on 21 Aug 2022 at 17:12:32
    Re: saving a SharePoint library document thumbnail to an image file

    Can I ask you one thing? I followed your demo and it works only when there is no image in my powerpoint file.

    When there is an inserted image file, the create file at the end is that image file, not the preview image of the powerpoint page. Do you know why it's happening?

     

    Youngbin_0-1661101936002.png

     

  • SamuelBenjamin Profile Picture
    69 on 19 May 2022 at 10:01:45
    Re: saving a SharePoint library document thumbnail to an image file

    Seems that mp4 files thumbnails are no longer supported. I have open a ticket to Microsoft and they asked me for a recent screenshot of any site showing the mp4 extension available within supportedtypes action... Kinda stupid thing!

  • SamuelBenjamin Profile Picture
    69 on 07 Apr 2022 at 11:09:34
    Re: saving a SharePoint library document thumbnail to an image file

    Oh, mp4 is not included on supported types for my tenant. I will ask IT to include this.

    Thank you so much for your support!

  • SamuelBenjamin Profile Picture
    69 on 07 Apr 2022 at 11:06:22
    Re: saving a SharePoint library document thumbnail to an image file

    So it won't work for video files? Any way to get a video file thumbnail?


    I just need to insert the video thumbnail into an email body. It does works with this:

    <img src=@{triggerOutputs()?['body/{Thumbnail}/Medium']}>

     

    But the issue is that this will work for some time, if you open the mail a few hours, the image won't be shown. I gues it's because the Thumbnail value uses temporary token.

  • steve_hendy Profile Picture
    371 on 07 Apr 2022 at 11:03:56
    Re: saving a SharePoint library document thumbnail to an image file

    Try this SharePoint Online. Document Thumbnail (vitalyzhukov.ru)

  • steve_hendy Profile Picture
    371 on 07 Apr 2022 at 11:00:37
    Re: saving a SharePoint library document thumbnail to an image file

    The path is not full.

  • SamuelBenjamin Profile Picture
    69 on 07 Apr 2022 at 10:49:37
    Re: saving a SharePoint library document thumbnail to an image file

    Hi, just trying this, but getting back a 501 Bad Gateway error in my flow.

    This is how my http request looks like:


    If I just try this url on the browser, a get back a invalid response error.

    Is there any additional setting to be made in my site or anything else I'm missing?

    Thanks so much in advance!
  • steve_hendy Profile Picture
    371 on 11 Sep 2021 at 21:58:19
    Re: saving a SharePoint library document thumbnail to an image file

    https://blog.vitalyzhukov.ru/en/sharepoint-online-document-thumbnail

  • SF-30110036-0 Profile Picture
    on 07 Sep 2021 at 06:01:45
    Re: saving a SharePoint library document thumbnail to an image file

    Hi @v-xiaochen-msft. Perfect. You made that look easy 🙂 I appreciate you taking the time to help out!

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - Building Flows

Overall leaderboard