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:
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
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:
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).
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:
I have made a test on my side and the flow shows up in Flow menu well. My flow's configuration as below:
The flow works successfully as below:
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.
Do you need any other help?
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.
Check out how to claim yours today!
Check out new user group experience and if you are a leader please create your group
Test your skills now with the Cloud Skill Challenge.