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 / How to automatically p...
Power Automate
Unanswered

How to automatically pin a folder to top once it is created by a workflow?

(0) ShareShare
ReportReport
Posted on by 33

Hi,

I configured a flow in order to create several folders and sub folders in a doc library once an item has been added in a list. This is working fine! 

However, I need to pin one of these subfolders created by the workflow. How can I do this? 

ex.

Once an item is created, then create 

Folder 1, subfolder a (Folder1/subfoldera), subfolder b (Folder1/subfolderb)

and then : pin subfolder b

 

task 11.png

 

Pin to top functionnality is available in Sharepoint. Once this pin is selected, the folder is always displayed on the top of the library as shown in my screenshot : 

 

task13.png 

task 12.PNG

 

 

Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    68,697 Most Valuable Professional on at

    Could you explain a bit more what you mean by "Pin"?  

  • Eri_V Profile Picture
    33 on at

    Post updated 🙂

     

  • Verified answer
    Pstork1 Profile Picture
    68,697 Most Valuable Professional on at

    There's nothing available in the flow actions to do that.  I looked to see if there was a REST call that could do it, but didn't find anything that way either.  So at this point I think the only way to do it is in the user interface.

  • Verified answer
    v-alzhan-msft Profile Picture
    on at

    Hi @Eri_V ,

     

    I have made a test on my side and the Pin function that you mentioned is not supported in Microsoft flow currently, if you would like the function to be supported in Microsoft flow, you could submit an idea to the flow ideas forum:

    https://powerusers.microsoft.com/t5/Power-Automate-Ideas/idb-p/MPAIdeas

     

    Best regards,

    Alice   

    Community Support Team _ Alice Zhang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Eri_V Profile Picture
    33 on at

    Thanks

  • petecuttriss Profile Picture
    4 on at

    Hi everyone, this was something that I was looking to do via Power Automate also. In the end I found the answer with the help of the following stackexchange post: https://sharepoint.stackexchange.com/questions/252905/how-to-programmatically-pin-a-document-to-the-top-of-a-modern-library 

     

    To apply this REST API call within Power Automate, I used the Send an HTTP request to SharePoint action: 

    Uri: /_api/web/GetListUsingPath(DecodedUrl=@a1)/GetView(viewGuid=@a2)/AddToSpotlight(itemId=@a3,folderPath=@a4,afterItemId=@a5)?@a1=''&@a2=''&@a3=''&@a4=''&@a5=''

    petecuttriss_0-1620100554884.png

     

    The key was figuring out the various parameters: a1, a2, a3, a4 and a5:

    a1 = Server Relative Library Url

    a2 = View Guid

    a3 = Item Id

    a4 = Server Relative Folder Path

    a5 = -1 unless you are trying to pin it after an existing item

     

    Hopefully this helps some others.

     

    Regards
    Pete

  • Community Power Platform Member Profile Picture
    on at

    Hi @petecuttriss , I tried same above in power automate. it is not working. any chance to help.

  • petecuttriss Profile Picture
    4 on at

    Hi @Anonymous , sorry for the delayed response.  The best bet to trouble shoot this if you are having a problem is to carry out the pinning manually (i.e. via the GUI) and as you do this, take a look at the network calls via the debugging console.  You should see a call to "AddToSpotlight" and that will show you the parameters which you can then confirm you are setting correctly via your Power Automate call.

    Regards
    Pete

    petecuttriss_0-1685305758038.png

     

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…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard