Build flows

Learn how to build flows that copy and collect data, as well as flows that send notifications. Run your flows based on a schedule or on-demand from a button.

You will learn how to...

Create a button flow

In this topic, you will learn how to build a button flow for the Contoso Flooring Company.

Button flows can be used to send email to a team and alert them of tasks to perform. Ownership of the flows can be assigned to one worker or shared by multiple members on a team.

  1. First, go to the Microsoft Flow website and sign-in.
  2. Once you are done with the sign-in, select My Flows, and then Create from blank.

    Create from blank

    The first thing you'll need is a trigger. The button flow is a convenient one to use.

  3. If it's not there in your list, select Search hundreds of connectors and triggers at the bottom of the page, enter button, and it will pop up for you.
  4. Select Flow button for mobile.

    Search button

  5. Select Flow button for mobile - Manually trigger a flow.

    Select manual trigger

  6. On the input screen, select Add input text,

    Add input

  7. Enter Contoso Flooring in the first text box, and Warehouse delivery email in the second text box.

    Add input

  8. Select New step.

    Input text

  9. Select Add an action.

    Add action

  10. Select the Office 365 Outlook connector. If it isn't there, search for outlook.

    Search outlook

  11. Select Office 365 Outlook - Send an email.

    Send email

    When the button is pressed, an email is sent to the whole Contoso Warehouse team, no matter where they are in the building, letting them know that the delivery has arrived.

  12. Expand the fields and customize the email to work for Contoso Flooring.

    1. In the To field, enter an email address that is valid in your organization.
    2. In the Subject field, enter Delivery Arrived.
    3. To the right, notice a Dynamic content box popped up. To show, in the subject line, the exact date and time the button was pressed, select Date and Timestamp.

      Email date time

  13. Now, enter a simple Body for the email saying something like, Warehouse Team, please come to the unload bay as todays delivery has arrived.
  14. Select Create flow to save the flow.

    Create flow

Create a team flow

You can use this button flow as an example of how to create a team flow. What if the creator of this flow is out sick? What if she leaves the company? You want to make sure that this flow keeps running. To do that, add co-owners.

  1. Select the team icon on your flow to add a co-owner.

    Create team flow

  2. Enter names, email addresses, or user groups to add co-owners.

    Add co-owners

  3. To remove co-owners, select the trash can to the right of their name.

    Remove co-owners

  4. Select Remove this owner to finish the removal.

    Remove co-owners


In this lesson, you've seen how to create a button flow.

In minutes, the flow gave a warehouse worker the ability to alert her team to a delivery arrival, so that the team didn’t have to stand around and wait, wasting valuable time they could spend on other tasks.

The worker then shared that button out to her team, so others could trigger the same flow if she wasn’t around.

Next lesson

Check out the next lesson to see how to create a flow that uses push notifications.

Get notifications

A common use of Microsoft Flow is to get a notification when something happens. Notifications can be emails, text messages, or push notifications on your phone.

From a template

Required app

It's easy to create a flow that sends push notifications to your mobile device. You can create the flow in the mobile app or at, but you'll need the mobile app to receive push notifications. The Microsoft Flow mobile app is available for Android, iOS, and Windows Phone.

If you are using an unsupported mobile device, consider using SMS messages (texts) to receive notifications instead of push notifications.

Creating flows that send notifications

You can use a template, like in the video above, or you can use the Send a push notification action when creating a flow from scratch. You can include dynamic content from other actions or triggers.

From scratch

Next lesson

Now that you've seen how to receive notifications, let's look at using Microsoft Flow to copy files.

Copy files

Copy files

Today, it's very common to use a file storage service, such as OneDrive or Google Drive. Have you ever needed to copy files from one storage service to another? Microsoft Flow makes it easy to automatically move and copy files between two services.

Creating flows that copy files

You can use a template, like in the video above, or you can create a flow from scratch. Different services have different details and parameters in their actions. In the video, we showed you copying a file from OneDrive to OneDrive for Business. Here's another example we created from scratch to copy from OneDrive to DropBox.

OneDrive to DropBox.

Next steps

Next, we'll look at how you can collect data from services.

Collect data

In addition to being able to get notifications and copy files, Microsoft Flow also enables you to collect data. This can be useful for analytics, like with Power BI.

Sources and destinations, triggers and actions

When collecting data, your trigger can be any of a variety of services, such as Twitter, your Office 365 Email, or the Common Data Service. Each one of these services has their own dynamic properties that represent fields you can populate in your destination.

Some common destinations you can store data in include Excel, SQL Server, SharePoint lists, and Google Sheets. You can also use the Common Data Service.

Next lesson

Now let's learn how to post tweets based on data in a SharePoint list.

Post tweets from a flow

For this flow, you'll build a SharePoint list where the Marketing team for Contoso Flooring stores their Twitter posts and posting dates. From there, you will build a flow that will auto-Tweet the content for them.

Connect Microsoft Flow Services

In this topic, you'll be using the SharePoint and Twitter services. If you are using a service that's new to you, then you'll first need to connect to the new service.

  1. In Microsoft Flow, select the gear icon, then Connections,

    Get connection

  2. Select + Create connection.

    Create connection

  3. Scroll down the list, find Twitter, and select +.

    Click plus

  4. To authorize a Twitter account, enter your username or email, and your password, and then select Authorize app.

    Create ID and password

  5. To check your connections, select the gear icon and Connections.

    My connections

    You should see your new Twitter connection and any other connections you have created.

    Twitter connect

Build a SharePoint List

The first thing you need to do is create a new SharePoint Online list for Contoso Flooring.

  1. In SharePoint Online, select New, and then List.

    Create new list

  2. Name the list Contoso Tweets.
  3. Clear the Show in site navigation check box, and select Create.

    Create list

    When you select Create, SharePoint takes you to your new list.

  4. By default, the list has a single column - Title. Add another column and name it Tweet Contents. The things that you’ll say in your tweets will go here.

    1. Select the plus sign, then select More...

      Create list

    2. Select Multiple lines of text, then select OK.

      Create list

  5. Add a column for the tweet date and time, and name it Tweet Date.

    1. As with Tweet Contents above, select the plus sign, then select More...

      Date time column

    2. Scroll down to Date and Time Format. Select Date & Time, so that both are included.

      Date and time

    3. Select OK. You see the Contoso Tweets list in your SharePoint site, and you can add new items to the list.

Build the flow

Your list is built, so now you can build the flow.

Choose a trigger

  1. In Microsoft Flow, go to My Flows, then select Create from blank.

    Create from blank

  2. Select When an item is created.

    Add trigger

    We want our trigger to fire when a new row is added with tweet content.

  3. Select your SharePoint site, then select the list that you set up earlier, Contoso Tweets.

    New item created

Okay, that’s it for the trigger.

Add an action to delay posting

  1. Select + New step, then select Add an action.

    Add step and action

  2. Under the Schedule service, select Delay until.

    Delay until

  3. Set the delay value.

    1. Click or tap in the Timestamp field.
    2. When the dynamic content box opens, scroll down to the bottom, and you see the three columns from the SharePoint list: Title, Tweet Date, and Tweet Content.
    3. Select Tweet Date.

      Delay until timestamp

      Now, when someone adds something to your SharePoint list, it will delay any action until the date and time you set in the Tweet Date column.

      Dynamic time stamp

Add an action to post a Tweet

Now you'll add another action for the flow to take at the date and time specified in the Tweet Date column.

  1. Select + New step, Add an action, then search for Twitter.

    Add tweet

  2. Choose the action, Twitter - Post a tweet.

    Post a tweet

  3. Click or tap in the Tweet text field, and in the dynamic content box, select Tweet Contents. Here's the sequence you have created.

    Tweet date content

  4. Select Create flow...

    Create flow

  5. Select Done.

    Click done

    Now the flow is complete.

    Flow is done

    When a new item is created in your SharePoint list, the flow will delay posting until the pre-set date. When that date is met, the flow will post to Twitter with the text from the Tweet Content column in your list.

Next lesson

In the next lesson, you'll learn how to run flows on a schedule using a trigger called Recurrence.

Create scheduled flows

In this topic, you’ll see how to run pre-scheduled flows using a trigger called Recurrence. You’ll build a flow for the Contoso marketing team that automatically pulls customer email addresses from an Excel table on OneDrive. You’ll configure the flow so that once per day, new email addresses that were added to the spreadsheet are then added to a MailChimp customer list.

Create a scheduled flow

  1. Open Microsoft Flow, select My flows, and then select Create from blank.

  2. Select Search hundreds of connectors and triggers.
  3. Search for the Schedule service, select it, and then select the Schedule – Recurrence trigger.

  4. Set Frequency to Day, and Interval to 1. Select New step, and select Add an action.

  5. Search for Excel, select the Excel service, and select the action Excel – Get Rows.

    Note: Be sure to select Get rows, not Get row.

  6. Select File name and navigate to your file location. Select Table name and select the desired table in the spreadsheet.

  7. Add a new action.

  8. Search for the MailChimp service, then select the action MailChimp - Add member to list.

    Note: MailChimp is a premium connector. Depending on your Microsoft Flow license, you might need to sign up for a trial to use this connector.

  9. Add the List Id and Status fields from the dropdown menus:

    • List Id – Select your desired MailChimp mailing list
    • Status – Select Subscribed

  10. In Email Address, use the dynamic content feature to add the ContactEmail field.

    Notice that the flow automatically creates an additional step. Flow detects that you are going to set an action that requires an additional action. Whenever the flow reads a new email address, it will also create a new action for each row.

  11. Use dynamic content to fill in the First name and Last name fields:

    • First name – FirstName
    • Last name – LastName

Now this flow will run once a day and get new rows from this Excel table, grab the email address and name, and use them to populate the MailChimp Contoso mail list, saving you both time and money.

Convert and store documents

In this topic, you’ll see how Contoso Flooring uses Microsoft Flow to automatically convert documents to a standard format and then store them in SharePoint Online for safekeeping in the cloud. You'll create a flow that detects when a new file has been added to a OneDrive for Business folder, and then converts that file to PDF and stores it to a SharePoint Online folder.


For this scenario, you’ll need an account with Muhimbi, a PDF conversion service. If you don’t have a Muhimbi account already, you can sign up for a free 30-day trial. Follow the instructions on that page for deploying the app through your SharePoint Online site.

Create the source and target folders

First, you need to create the source and target folders on OneDrive for Business and SharePoint Online.

  1. In OneDrive for Business, under Files, create a folder named Finished Documents.

  2. In SharePoint Online, in Shared Documents, create a folder named PDF – Finished files.

Create the flow

  1. In Microsoft Flow, select My Flows, and select Create from blank.

  2. Select Search hundreds of connectors and triggers.
  3. Search for OneDrive, select OneDrive for Business, and then select the trigger OneDrive for Business - When a file is created. In Folder, select the folder icon and select the Finished Documents folder that you created in the previous step.

  4. Select New step, and then select Add an action.

  5. Search for Muhimbi, select the Muhimbi PDF connector, and select the action Muhimbi PDF – Convert document.

  6. At this point, you may be prompted by Microsoft Flow to authenticate to Muhimbi. You will need to register Muhimbi using your SharePoint tenant ID in order for Microsoft Flow to use the Muhimbi service.

    1. To find your tenant ID, select the Settings gear icon in SharePoint Online, and select Site settings.
    2. Under Site Collection Administration, select Site collection app permissions. Your tenant ID is the identifier that follows the “@” symbol in any of the app listings.

  7. In the Convert document action, set the following values:

    • Source file name: From the dynamic content list, select File name.
    • Source file content: From the dynamic content list, select File content.
    • Output format: From the dropdown, select PDF.

So far, you’ve configured your flow with the following steps:

  1. The flow is triggered whenever a new file is added to a specific OneDrive for Business folder
  2. The Muhimbi service converts that file to PDF.

For the final step, you’ll add an action that will move the PDF document to a SharePoint Online folder where the team can access it.

  1. Select New step, and then select Add an action. Search for SharePoint, and select the SharePoint – Create file action.

  2. In the Create file action, set the following values:

    • Site address: The URL of your SharePoint site.
    • Folder path: Select the folder icon and navigate to the PDF - Finished files folder.
    • File name: From the dynamic content list for Convert document, select Base file name, then add “.pdf” so it will be saved in SharePoint with the file extension.
    • File content: From the dynamic content list for Convert document, select Processed file content.
  3. Select Create flow at the top of the page to save your work.

Test the flow

  1. To test the flow, add a new file to your Finished Documents folder in OneDrive for Business.
  2. In Flow, select My flows, and then select the new flow to view the run history. By default, the flow is configured to run every five minutes.
  3. After the flow runs, verify that the file was converted to PDF and saved to the SharePoint PDF – Finished files folder.


You've completed the Build flows section of Microsoft Flow Guided Learning.

You learned how to...

Next Tutorial

Work with approvals


  • Deon Herbert
  • Michael Blythe