I'm pretty sure you have noticed that in modern SharePoint UI there is a way to run Microsoft Flow:
You can see your flows, create a new one or trigger a flow using that drop-down. How to add my own flow to be visible in that drop-down? Read further to find out how.
Well, it's not so difficult. However, the thing is, that not all the flows related to that list or item will be visible in the drop-down. If you click on "Create a flow" you will see a lot of predefined flows available:
Most of them don't add a new option under Flows drop-down. For example "Send an email when a new item is created". The trigger for that flow is "Item created" event, meaning that you can't run it manually. This type of flow will not appear under drop-down. The only way to add an instance of a flow to the drop-down is using "For selected Item" trigger. As soon as you have a flow with such a trigger, it will be available under Flow drop-down (if an item is selected in a listview).
That's all cool, but what to do if I want to have other types of flow also available under drop-down?
Unfortunately, you don't have a lot of options here:
- You have either re-create your flow from scratch and use "Selected Item" trigger.
- Or export your flow as .zip file, modify trigger and import updated flow.
I found the solution for the last option here.
- export the Flow as a zip package (option "create as new")
- make sure to rename the original workflow to avoid conflicts when importing
- unzip the package file, look for the definition.json file
- replace the trigger by editing the file
- recreate the zipfile (make sure the Microsoft.Flow folder is in the root of the zip file)
- reimport the package, the flow is now triggered by the new action
Be aware, that you will have to fix all connections as well because it might not work with a new Flow.
If you want to learn more, check out MS Flow resources - divided by difficulty level. Also Online MS Flow conference was at the beginning of December 2018. A lot of very cool presentations from leading MS Flow experts. Check out this playlist on youtube with all presentations recorded.