web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : croQznmFp7Uax+bOf1LFJs
Power Automate - Building Flows
Answered

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

Like (0) ShareShare
ReportReport
Posted on 30 Apr 2020 16:26:09 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

 

 

I have the same question (0)
  • petecuttriss Profile Picture
    4 on 28 May 2023 at 20:30:41
    Re: How to automatically pin a folder to top once it is created by a workflow?

    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

     

  • Community Power Platform Member Profile Picture
    on 03 May 2023 at 06:30:20
    Re: How to automatically pin a folder to top once it is created by a workflow?

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

  • petecuttriss Profile Picture
    4 on 04 May 2021 at 03:58:50
    Re: How to automatically pin a folder to top once it is created by a workflow?

    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

  • Eri_V Profile Picture
    33 on 01 May 2020 at 14:27:19
    Re: How to automatically pin a folder to top once it is created by a workflow?

    Thanks

  • Verified answer
    v-alzhan-msft Profile Picture
    on 01 May 2020 at 04:35:00
    Re: How to automatically pin a folder to top once it is created by a workflow?

    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.

  • Verified answer
    Pstork1 Profile Picture
    68,214 Most Valuable Professional on 30 Apr 2020 at 19:52:01
    Re: How to pin a folder once it is created by a workflow?

    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.

  • Eri_V Profile Picture
    33 on 30 Apr 2020 at 17:49:01
    Re: How to pin a folder once it is created by a workflow?

    Post updated 🙂

     

  • Pstork1 Profile Picture
    68,214 Most Valuable Professional on 30 Apr 2020 at 16:29:04
    Re: How to pin a folder once it is created by a workflow?

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

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Tom Macfarlan – Community Spotlight

We are honored to recognize Tom Macfarlan as our Community Spotlight for October…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 707 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 499 Moderator

#3
chiaraalina Profile Picture

chiaraalina 312

Last 30 days Overall leaderboard