Finally moving on to Microsoft Flow. I really like Flow. It’s a great replacement for the SharePoint Designer Workflow and in my opinion a strong competitor to 3rd party workflows. Don’t get me wrong, those other tools are great and I have used them happily in the past, but so far Microsoft Flow has met all of my recent needs and already covered by the O365 license I have. If I don’t have to spend extra or my client doesn’t either and Flow meets our needs, then to me that is a huge bonus. In today’s post, I am going to illustrate how to create a workflow that does NOT fire when an item is added. This is because, for the requirements of this solution, users will want to be able to save the item without a workflow being initiated. So in other words, I am going to show how to create a Flow to be started manually. This can be done from the list, or in a later post I will show how to do it from the PowerApp form itself.
Posts in this series:
- Preparing SharePoint
- Integrating PowerApps as a Custom List Form
- Customizations All List Form PowerApps Should Have
- Setting a SharePoint People Picker Field Programmatically in PowerApps
- Cascading Drop-down Lists and People Picker in PowerApps
- Create a Flow to be Started Manually
- Creating a Multiple Approver Microsoft Flow
- Sending a Tweet from Microsoft Flow
- Starting a Microsoft Flow from a PowerApp
Create a Flow to be Started Manually
This post is just going to show you how to create a manually intiated Flow. I am not going to do any of the approval steps yet. That’s in the next post. But to prove the flow worked, I have added a column temporarily to my Social Media Request list called “Did Workflow Run”. This field will be updated when the flow is initiated.
To create the Flow follow these steps:
- Access your Flow Management Console (https://flow.microsoft.com)
- Click on “+ Create from blank“
- The trigger we want is a SharePoint trigger, but it won’t be in the popular list. Click on “Search hundreds of connectors or triggers“
- To refine your options, select SharePoint as the connector category
- Select the trigger: “SharePoint – For a selected item“
- Click on the drop down for Site Address.
- Select the site your list exists on, or if it isn’t listed click on Enter custom value.
- Type in the URL your site is located at.
- Select the list you wish to attach the Flow to.
I could finish here, as this is all you really need, but let’s actually have it do something.
- Click + New step below the trigger.
- Click on Add an action.
- Select the SharePoint connector again.
- Scroll to the bottom and select SharePoint – Update item.
- Repeat steps 7-9 here to connect to the list you wish to update.
- Here’s where Flow is awesome. It already knows that when you start the Flow it’s going to be against an item and it offers up that ID for you to use in the Id field. In the Dynamic content window that pops up, select ID.
- Now if you have any required fields like I do, you are going to need that data so it doesn’t get over-written as Flow will not allow you to ignore required fields. Back up just a bit by clicking on the + (plus) sign in the arrow above the action you are currently working on.
- Click on Add Action.
- Select SharePoint from the category and choose Get item.
- Enter in the site, list and ID (from the Dynamic Content again). This is because we want to read the data from our current item into the flow.
- Next click on your required field and you will see a lot more information than before. Select the field you need to ensure has a value:
- Next type in a message in the other field you wish to update.
- That’s it for now. Give your flow a name (at the top) and click save.
To test out your flow:
- Go to the list, click on the “Action dots” for your item.
- Highlight Flow.
- Click on your flow.
You will be given a confirmation screen. Simply click Continue and then Run Flow. Because the flow is so simple you will see a result almost immediately.
Thanks for reading!!