Microsoft Flow In 10 Days - Day One - Flow Templates, Connectors, Triggers, Actions, Conditions

Introduction

Microsoft Flow


Microsoft Flow is an online workflow service that enables you to work smarter and more efficiently by automating workflows across the most common apps and services.

On October 31, 2016 Microsoft Flow's General Availability was announced.

Microsoft Flow enriches both Office 365 and Dynamics 365 with new workflow capabilities.

One of the capabilities that makes Microsoft Flow so powerful is you can use data from any data source, anywhere in your workflow. I will be explaining this in one of my demos.

This is sort of a replacement to the most powerful tool of the SharePoint family – SharePoint Designer.

Even though there are one or two functionalities which are available in SharePoint Designer that are not yet released in our MS Flow, we could say without any doubt that MS Flow has a huge spectrum of functionalities that makes the lives of developers and power-users much easier.

What I am going to cover

I am planning to write a series on MS Flow on which, I will cover most of the areas in it. This will be a 10 days series

  • Day 1: Flow Templates, Connectors, Triggers, Actions, Conditions
  • Day 2: The famous Twitter flow, My Flows, Team Flows, Share a Flow
  • Day 3: Flow in Mobiles Debug a flow, export and import a flow
  • Day 4: Approval Flow (sequential and parallel)
  • Day 5: Flow with SharePoint on-prem (Gateways)
  • Day 6: Flow vs logic apps
  • Day 7: Flow with custom applications web services
  • Day 8: Flow with Graph Api
  • Day 9: Flow with Cognitive services
  • Day 10: Flow Administration and DLP, Pricing etc.

Create a Simple Flow

Without any further delay, I am jumping into Flow Development.

Go to the Homepage of flow: https://flow.microsoft.com/en-us/ and sign in with your Microsoft Account.

Microsoft Flow
 
Skipping out the jargons, I will create a simple flow and will explain things from there.

Scroll a bit to the template region. There you can see a lot of templates segregated by some logical groups. I am selecting the famous template of Flow. Get daily weather reports delivered to your mail and phone.

Microsoft Flow

It navigates to the next page which shows the steps involved in this template.

Microsoft Flow

Click continue. It goes to the next page showing the steps involved inside it.

Microsoft Flow
 
Microsoft Flow

Click on create flow. It will ask for Location Block’s Inputs field.

Microsoft Flow

I am entering “Chennai” in the Inputs field and again clicked on “Create Flow” at the top. Now our flow is successfully created. Click on Test flow.

Microsoft Flow

It opens up a pane on the right side. Select “I’ll perform the trigger action” and click on “Test”.

It opens up a modal in which you should click on the “Run Flow”.

Microsoft Flow

Flow starts running and this is also confirmed through a modal box.

Microsoft Flow

On Clicking Done it opens up the flow activity screen in which it shows the steps and its status whether it has run or not.

Check your Microsoft mail and you will have received this mail.

Microsoft Flow

Thus we have created a simple flow and it has run successfully. We have started to toddle.

Ok. Now we will hold on a while and break  down what we have done.

Template in Flow

First we selected a template. Template is the one which is a set of rules and conditions which are all combined in a single bundle. On selecting that we can leverage the already built in logics and we don’t have to write from scratch.

So the next question arises. Is selecting template the only way to start a flow?

No. There a many ways. We can:

  • Select from a template as we have seen above. 
  • Select a service from the home page which in-turn becomes the trigger (first step) for your flow
Microsoft Flow
  • On clicking My Flows in the ribbon, we can see there is an option to create a flow from scratch.
Microsoft Flow
  • There is an option to import the flow (from an already saved flow). This we’ll discuss later in this series.
Microsoft Flow

Connectors aka Services

There are around “220” services to which the flow can connect and these can be combined to form a workflow like SharePoint, SalesForce, Mailchimp, Twitter, Facebook etc... Sounds amazing, right!!!. And the number will increase rapidly in due course.

Other than these predefined connectors, we can create our own HTTP connector (webservice from your custom application) to provide data from it to other systems. We will cover this in Day 7 of our series.

I will show a sample and very famous flow in the next part of the series, connecting SharePoint and Twitter and the flow will be when an item is created in SharePoint, our flow triggers and tweets about it.

Triggers in Flow

  1. Triggers are the events of every system responsible for the starting of the flow. Every system has its own set of events that can be a trigger to a flow. For example we will see a couple of systems.

    1. Facebook
      When a new post is posted on my timeline, it can be a trigger to a flow which can add a list item in my SharePoint with the content from the Facebook post.

    2. Twitter
      Whenever there is a tweet with a specific hashtag that can be added as a row in Excel, or a lead in CRM Dynamics, there will be an item in SharePoint or a mail to a person with the body that contains the Tweet’s content.

      Now you should have understood how powerful the flow is!!! The sky is the limit if you understand the nuances of Flow.

  2. Recurrence trigger – This helps in scheduling a flow to run in a periodic manner, it can be daily or every hour or every minute. In our flow stated above, we have used the “Recurrence” trigger.

Conditions and Actions

Instead of explaining this topic, I will take our above flow here

Microsoft Flow

The above image itself is self-explanatory. If the Rain Chance is greater than 20, the left block below will execute and if it is not the right block will execute.

The data from the above steps will be filled in the forthcoming steps. This will be explained in detail in the next part of this series.

I have just scratched the surface of flow. In the forthcoming parts of this series we will deep-dive into this.

Thanks for reading and share with me your thoughts below.