cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Merley72
Level: Powered On

Difficulty in running an ad-hoc Flow against a File in a SharePoint Library (not List)

I’ve done a bunch of tests in Flow against SharePoint Online sites and subsites using both the pre-built Templates and tried my hand at building my own. Whenever I select a pre-built template such as ‘Start approval when a new item is added’, it only refers to Lists that are held on the site.  Other templates such as ‘Start an approval for new file to move it to a different location’ gives the user an option to select a Library which is great.

 

However I want to initiate a Flow on a Library document (File), in an ad-hoc manner not upon either Creation or Modification – I want the option to be User initiated at a point of my choosing.

 

If I look at the Trigger options for a new Flow from nothing, I see ‘SharePoint – For a selected ITEM’ option which when I saw that, it gave me the hope of being able to activate it as I wanted, but no, it appears it can only be used on LISTS – unless I am really missing something very basic. I read in the information tab (the little ‘I’ in a circle to the right of the line), it says the following:

 

  • “This trigger allows you to start a flow for a selected item in a SharePoint list or library. You can use the columns of the list or library as output parameters. For a file, you can use the "identifier" column to get file content “

 

I’ve tested the approach on list items and can run things in the ad-hoc fashion I’m looking for, however I cannot work out how I can use this trigger or any other method of activating a Flow on the Document / File in a LIBRARY.

 

Can anyone please tell me what I am doing wrong and importantly give links to guidance etc to help me on my way. Thanks

4 REPLIES 4
Community Support Team
Community Support Team

Re: Difficulty in running an ad-hoc Flow against a File in a SharePoint Library (not List)

Hi @Merley72,

 

Could you please share a screenshot your flow's configuration?

Do you want to start a flow based on a selected file of SharePoint library manually?

 

I have made a test on my side and use the "For a selected item" as the trigger. My flow's configuration as below:7.JPG

Within List Name field of "For a selected item" trigger, I type a Library name as a custom value, but the created flow is not shown up in Flow menu of my SharePoint library (I have tested it on my SharePoint list, the created flow could be shown up in Flow menu of SharePoint list).8.JPG

I afraid that creating a flow from scratch and using the "For a selected item" trigger as a trigger to start a flow manually is not supported for SharePoint library currently. 

 

If you want to start a flow based on a selected file of SharePoint library manually, please check the following article:

https://flow.microsoft.com/en-us/blog/flow-in-spo-document-libraries/

 

I have made a test on my side and the flow shows up in Flow menu well. My flow's configuration as below:10.JPG

The flow works successfully as below:11.JPG

 9.JPG

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Merley72
Level: Powered On

Re: Difficulty in running an ad-hoc Flow against a File in a SharePoint Library (not List)

Hi Kris,

 

Thanks very much for the response and I've some more feedback to add to things since I sent off the 'HELP!' message.

 

I managed to get a couple of Flows working on a Library, even one Flow which was based on a manually invoked choice (and not automatically started for a new document or a change) so that was really useful and took me a long way forward.

 

One aspect which caught me out was the business of the name of the Library just needing to be typed into the ‘List Name’ field as I was expecting the Libraries to be displayed in the drop-down as well as the Lists. Although it explains you can add entries using the ‘Custom’ approach, I never read anything that states that if you were doing something for a Library, then that was the only way to select the Library.  I’ve also discovered that you can add the List ID into that field as well and that also works (but is tricky to get to in the first place – typing the Library name is easier!).

 

Like you I’ve struggled with the ‘For a selected item’ trigger and I’ve not yet succeeded but I’ve not exhausted testing with the ‘Get Item’ action completely. More work with that and the trigger needs to be done at my end. 

 

Again like you I did successfully create a Flow linked to a Library as a manually activated Flow (it shows in the Flow drop-down when I’ve selected a document in the View – as per your last picture) if I chose to create one of the ‘standard’ options that appear when you opt to ‘create a Flow’ from a Library – my example was ‘Complete a Custom Action for the selected item’. That worked OK like your ‘Request Manager Approval….’ one.   So I’m beginning to get places and thanks very much for your input and work on my behalf.

 

One thing I have found though which I’ve gone back to Microsoft about is the total inability to change an XML Form Library – which holds and manages Browser Forms – from the Classic View to the New Model View (and therefore to see the ‘Flow choices). Microsoft say that this has been excluded at the moment on purpose and I couldn’t get a reason why.  We work with a number of companies where Form Libraries have been extensively used, and IT people / users are greatly disappointed when all other Libraries and Lists have converted to the New View approach, not to be able to convert their XML Form libraries.  It looks very odd.  I think this is has to be MS making Form libraries look ‘out of date’ and therefore indirectly persuading people to move away from them. 

 

Thanks again for you response and any more progress I make, I will add to this thread.

 

Regards, Alan C.

 

 

Community Support Team
Community Support Team

Re: Difficulty in running an ad-hoc Flow against a File in a SharePoint Library (not List)

Hi @Merley72,

 

Do you need any other help?

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Merley72
Level: Powered On

Re: Difficulty in running an ad-hoc Flow against a File in a SharePoint Library (not List)

At the moment I'm still testing and experimenting on ways I can use Flow, but the big problems (can they run against Libraries and can I run them against XML Form Libraries) I've managed to figure out and understand to the level needed so far.

 

The fact that XML Form Libraries can't be converted to a 'New Look' View is to my mind a real drawback, though further testing I've done, allows a user to run a 'Flow' on a Form Library, simply by adding the name of the Library in the 'List Name' field using a Custom.  That was a good find.  I've successfully run Approvals and other tests in that fashion to check out what I can do and in that respect, Flows built against a Form Library work exactly as Flows running against an ordinary Library.

 

Regards

Alan C.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (5,290)