Create a Flow with Microsoft Flow
Posted by Melinda Barnsley, Last modified by Christian Knowlton on 12 March 2019 12:16 PM

The Office 365 suite has a workflow creation tool called Microsoft Flow. The tool allows ways to automate business processes. In this example, we will create a Flow that takes a Form submission, copies it to a SharePoint list, and sends an email alert that a submission has come in.

Prerequisites

We will use the Form and the List created in these two earlier tutorials:

  1. Create a Form with Microsoft Forms
  2. Create a List in Microsoft SharePoint

 

Overview of Microsoft Flow

What is Microsoft Flow? Microsoft Flow allows you to automatically listen for an event and then perform processes based on that event. The two basic units are Triggers and Actions.

Triggers

Triggers are the events that occur that can kick of the Flow. The Flow listens for these triggers and when they occur, kicks of the Flow which then performs the Actions. Examples of Triggers are:

  • A new file is created
  • A new row is added to a List
  • A form is submitted

Actions

Actions are the processes that occur in the flow once it is triggered. These actions are the powerful part of Flows that can help to automate business processes to save time and decrease errors. Examples of Actions are:

  • Send an email
  • Extract contents of a zip file
  • Create a new row in a List

Triggers and Actions work together to create the Flow

 

Open Microsoft Flow

In a web browser, get to Microsoft Flow in one of these ways:

  • Via A SharePoint list
    • Login in to a SharePoint site.
    • Click the gear icon in the upper-right corner, then select “Site Contents” from the menu.
    • Click on a List’s name to navigate to the List’s detail page.
    • In the grey menu bar above the main content area, Select Flow->See your flows.
  • Via Microsoft Portal
    • Please Note: Not all users will be able to access this way.
    • Navigate to the https://portal.office.com/ and login, if necessary.
    • Click on the Flow link under the Apps section.
    • If you do not see the Forms link, use the Search box in the upper right to search for “Flow”.
  • Directly to Microsoft Flow

 

Create a Flow

While you can build a Flow from scratch, it’s much easier (and saves time) to build one from the many templates Microsoft has built in to the tool. Let’s start by building a Flow using the “Records from responses in SharePoint” template.

  • Ensure you are on the Home tab in Flow.





  • In the search box, enter “form” and click the magnifying glass icon.
  • Click on the “Record form responses in SharePoint” tile in the results.




  • You will be brought to a screen that shows your template selection and any connections that will be used for the Flow. In this case, a Microsoft Forms connection and a SharePoint connection will use your account’s authentication when the flow runs. Click the “Continue” button.

 

Build the Flow

You are now in the to the Flow builder page. This is where you will set the parameters that will make the flow work. It’s easy enough to start at the top and follow the prompts down.

At the top is the “When a new response is submitted” block. This is the trigger for the Flow. It will listen for submissions of the selected form and kick off the Flow. Select your form from the “Form ID” drop-down.



Next, we have the “Apply to each” block that is a wrapper for all the actions we want to perform. There are several actions with the wrapper.

  • We can leave the “Select an output from previous steps” as its default “List of Responses”.
  • In “Get response details” block, we again select our form from the drop-down.



We have now told the Flow that we want to perform an action when a submission is made to our form. Next, we tell it to take that submission data and make a new row in our SharePoint List.

  • In the “Create Item” block
    • In the “Site Address” box, select the name of your SharePoint site where your list was created.

In the “List Name” box, select the name of the list you want to create a row in.


You’ll notice that once you select the Site and List values, the “Create Item” block displays additional fields that match those you created on your list.

Now we need to map the form responses to the new list item. We’ll do so by clicking through the fields in “Create Item” block and setting what to populate it with.

  • Set the “Title” field.
    • Click into the “Title” box. The “Dynamic Content” dialogue box will display to the right. (If you have a narrow display, “Dynamic Content” will display inline below the field”.
    • Type “PSU Favorite Spots submission: “ in the “Title” field.
    • In the Dynamic Content dialogue, type “sub” in the search bar. This will filter the available options down to the one you’re looking for. In this case, we’re looking for the built-in field “Submission time”. Click on it and it will be added into the Title field after the text you typed.
  • Set the “PSUAssociation” field.
    • Since this is a Choice field, you can hard-code this to one of the list items, or set it to response field. We’ll do the latter.
    • Click on “PSUAssociation” field and select “Enter custom value”. This will bring up the familiar “Dynamic Content” dialogue.
    • Filter by “assoc” and click on “How are you associated with PSU?”.
  • Set “FavoriteRestaurant”, “FavoriteOutdoorSpot”, and “FavoriteCampusSpot”.
    • Click on each of the fields, filter the Dynamic Content to the desired field and click on it to set that list item to that submission value.

Here’s what it should look like with all the values populated.

Our final step is to add an action to email us when a submission comes in.

  • Click on the “Add an action” link near the bottom of the Flow.
  • In the search bar, type “send.” The results will filter to ones that contain the search term.
  • Click on the “Send an email” option.


  • You are now presented with the basic fields needed for an email.
    • Fill out the “To” field with your email address.
    • Type in a subject.
    • Create a body to the email. If desired, you can include some of the submission fields in the body of the email.
    • You can also provide a link to the created list item by including “Link to item” from the Dynamic Content in the body of your email.

Here’s what your email could look like:


Don’t forget to click “Save” to save all your work!

Now, for the grand finale, we’ll test out the flow!

  1. Go to your form, fill it out, and submit it.
  2. Go to your associated list and see that a new list item has been created. This can take a minute or two
  3. Check your email for the alert message. This can also take a minute or two.

That was a fairly simple use case, but automating business processes such as these can be a very useful way to save time and minimize data errors.

For additional resources and tips about using Microsoft Flow, try out this link: https://docs.microsoft.com/en-us/flow/

 

(0 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments: