cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Michal
Kudo Collector
Kudo Collector

Can we make SharePoint "For selected file" trigger site-independent?

Hi, 

Just started to use the Power Automate from within the SharePoint document library and I can see that it refers to a specific site and document.

I would like to make the flow reusable across all tenant and all sites (i.e. when it is needed, create a button that will trigger the specific flow)

So, can we make SharePoint "For selected file" trigger site-independent?

1 ACCEPTED SOLUTION

Accepted Solutions
Pstork1
Dual Super User
Dual Super User

Since the trigger requires specifying the site and specific Library in order to work, no it can't be made site independent.  You can do a Save As and modify the copies to work with different libraries in different sites.  But there is no way to connect the same flow to multiple libraries at the same time.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

6 REPLIES 6
Pstork1
Dual Super User
Dual Super User

Since the trigger requires specifying the site and specific Library in order to work, no it can't be made site independent.  You can do a Save As and modify the copies to work with different libraries in different sites.  But there is no way to connect the same flow to multiple libraries at the same time.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Thank you @Pstork1 

I am struggling with SharePoint's "Get file content" action inside of a "For selected file" flow.

Maybe you know a way how to get the info that is needed for the "Get file content" action, so I can save the file to the OneDrive?

This should work for any selected file in a given document library.

 

I have already extracted the "Site address" from the  "For selected file" trigger as below. 

 

split(triggerBody()?['entity']?['itemUrl'], '/_layouts/')[0]

But cannot find the way to build a proper "File Identifier". 

Any tips?

 

The trigger gives you the item ID for the file.  You can use that in the Get File Properties to get more info, including the file identifier.

image.png



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Thank you @Pstork1 

I was trying to make it overcomplicated. It worked perfectly. 

Jay-Encodian
Community Champion
Community Champion

@Michal @Pstork1 - apologies for updating an old thread but hopefully some useful info to share.

Encodian have just released a new tool called 'Trigr' which solves this exact challenge, Trigr enables a single Power Automate flow to be exposed across every list / library in SharePoint Online instantly. The following video provides a demo on how to get this setup (takes a few minutes :)) - https://www.youtube.com/watch?v=VCQA15u5eIk

Trigr also support multi item / document selection, dynamic forms and some other cool stuff

No apologies needed.  I saw the announcement also, but haven't had a chance to try it yet



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (4,244)