Microsoft Flow – The hidden gems, are you aware of all of these?

Send me an email notification

Send me an email notification

Microsoft Flow – The hidden gems

Microsoft Flow has many connectors available. A lot of these connectors give you an API into applications, but there are a few connectors that feel like the core of Microsoft Flow. Hopefully there connectors will be extended soon as some of them feel like a very good start, but could do with more. Although, in some cases you could of course try the hard way using Microsoft Flow expressions.

The connectors that I consider to be part of the core connectors  do not need you to connect into any other system than flow. These are:

  • HTTP
  • Notifications
  • Approvals
  • Content Conversion
  • Control
  • Data Operations
  • Date Time
  • Flow button for mobile
  • Flow Management
  • FTP
  • SFTP
  • Schedule
  • SMTP
  • Variables

HTTP

The HTTP Connector gives us 3 actions.

  • HTTP
  • HTTP + Swagger
  • HTTP Webhook

All of these operations give you the option to call APIs if you haven’t got a better API available as part of the Connectors that Flow offers. In general I would avoid using these unless you can’t find the right connector. However there are cases where using these make sense. Like a few weeks ago where I wrote about calling a public web services that returned some data.

Notifications

The Notification connector is one of those forgotten connectors. It offers:

  • Send me a mobile notification
  • Send me an email notification

How often do you send yourself emails to debug a Flow? These notification actions are a light way option to do the same.

Send me an email notification

Send me an email notification

When this action runs you get a simply notification email sent out to you.

Test notification

Test notification

Ok, you don’t get the rich experience as with some of the other email action but fro debugging purposes this action is a lot quicker to configure.

Approvals

The Approval connector has just one action. Start and Approval creates an approval task that can be assigned to a single person or to multiple people:

Start an Approval

Start an Approval

Content Conversion

The content conversion is one of those limited connectors that could do with some more work form the Microsoft Flow team. At the moment you can convert HTML to text and that is it.

 

Content Conversion

Content Conversion

The above flow would result in the following output. This is quite handy if you have html and want to get some text, however there are other file conversion that might be useful too.

Other file conversions

Other file conversions

 

Control

The Control connector is one of those connectors that isn’t used very often and I’m not sure if you should use this at all. When you feel the need for using this action to terminate your flow in a failed status then you might find that you need to redesign your flow and just let the failing actions fail the flow, although …

Terminate

Terminate

 

… have a closer look at this action. There are 3 statuses in this action:

  • Failed
  • Cancelled
  • Succeeded

When you select cancelled or Succeeded the Code and Message option disappear from the dialogue. So imagine if one of your flow actions failed but actually you are happy for the overall flow not to report a failure. You could run this terminate action to make the flow succeed even though an action failed (note that you will need to use run after settings on the action).

Data Operations

The data operations connector gives a number of operations to convert data. The Operations are

  • Compose
  • Create CSV table
  • Create HTML table
  • Filter array
  • Join
  • Parse JSON
  • Select

As these action all deserve there own section in this post I will go through each on of these.

Compose

The Compose action reads data and spits it out as dynamic content. Huh, why would we need this then? We could create a variable (see later) or we could just build up the data wherever we want it.

So you could use this if you want to connect multiple variables or expressions or dynamic content into a single piece of Dynamic Content without the need for creating a variable.

Compose

Compose

Make sure though that you rename the Compose action. That way you can recognise your Compose variables.

Compose variables

Compose variables

 

Create CSV table

When you’ve got an HTML table you can use this action to generate csv instead. This action as particularly useful if you need to manipulate data in an html table using Flow.

Create HTML table

When you’ve got an CSV table you can use this action to generate HTML instead. This action as particularly useful if you need to manipulate data in an html table using Flow and you’ve converted the table into CSV first however you want to present the data in HTML to the user.

Filter array

Have you ever found yourself creating conditions inside a Apply to each step? Have a look at the Filter array option. With a few very easy to configure filters you can filter out all the unwanted items before you run the apply to each.

Filter array

Filter array

Join

The Join action is a bit like the concatenation expressions. This action lets you concatenate all elements in an array and you can specify a separator.

Join

Join

With the above action you could for example generate a line for a csv file from an array variable.

Parse JSON

The Parse JSON Operation gives you the different JSON elements of your JSON. Although there is an easy way in Flow to access each element by querying the json directly.  This options can be helpful for the less technical power user when they need to query json returned by a web service.

Parse JSON Operation

Parse JSON Operation

Select

Then the final action that is available under Data Operations. The Select action lets you adjust the format of an array. So when you have an array with 100 fields you could create a new array with just 10 of the fields included simply by selecting each field that you want.With the filter array action the select action give you the REST api operations similar to the we ones that we are familiar with in the REST api.

Date Time

The Date Time connetor gives us operations to do calculations with Dates and Time.

Date and Time

Date and Time

These actions give you an easy way to get the current time and add a number of minutes, hours or days to the original. you can even easily get a time in the past or future just by specifying the delta.

Flow button for mobile

To manually start a flow and ask the user for some input the Manaully trigger a flow trigger can be used.

Trigger a flow

Trigger a flow

 

Flow Management

With 19 actions available to manage your Flows this is one of the larger connectors. I’m not sure how often you would really delete a flow from another flow but this does give a lot of options.

Flow Management

Flow Management

With the Flow Management module I managed to create a flow that creates a backup of all my production flows on a regular basis.

FTP/SFTP

Do you want to FTP files to an FTP location? well this is your set of action to look at. With both an secure and non secure connection option available

FTP

FTP

Schedule

When you want to schedule a wait in your flow you can use either the Delay or Delay until. These actions make it easy to either wait for a certain time or for a certain period. Although these options might be useful sometimes, quite often it is easier to use the timeout feature on actions to set  a wait time.

Delay until

Delay until

 

Delay

Delay

SMTP

To send an email using the SMTP protocol you can use the Send Email in the SMTP connector. Nothing exciting here.

SMTP

SMTP

Variables

The Variables connector is one of the more important connectors. to use a variable you will first have to initialize a variable.  It is not possible to initialize a variable anywhere else than at the top of the flow. Annoyingly enough, you can’t add all your initialize variable actions in a single scope box, therefore many flows will start with a list of initialize variable actions.

Variables

Variables

 

There are a number of variable types that you can use.

Initialize variable

Initialize variable

 

Boolean, Integer, Float and String are all obvious simple data types. Object and Array might be a bit harder to understand.

An object is a JSON based object:

Initialize Max

Initialize Max

The objects could be the result returned by a web service or you could set the variable as shown above.

The variable connector also offers increment and decrement actions that can help you keep counters in for example apply to each loops.

That is all for now. If you find any other useful connectors within Flow that I have missed out then feel free to leave a comment below.

About the Author: Since 2007 I’ve worked with SharePoint as a Consultant, Developer and Architect. I’m currently working at Triad in Milton Keynes, United Kingdom as a SharePoint Consultant. In 2017 Microsoft has awarded me with an MVP Award in the category Office Servers and Services.

Reference:
Veenstra, P. (2018). Microsoft Flow – The hidden gems, are you aware of all of these?. Available at: https://whitepages.unlimitedviz.com/2018/01/using-power-bi-to-report-on-person-fields-in-sharepoint [Accessed 29 Mar. 2018].

Share this on...

Rate this Post:

Share: