Fun with Microsoft Flow, What3Words and Flic Button

ByRob Peledie

Fun with Microsoft Flow, What3Words and Flic Button

There’s some really cool IOT stuff going on, and its getting easier to get involved and have a go.

I thought in this blog I would have a play with a couple of tools and see what we could do. Hopefully it’ll inspire you to have a go and improve!

For this article I am going to use:

  • Microsoft Flow
  • What3Words 
  • Flic

Before I go any further, lets just have a quick overview of these tools.

Microsoft Flow

Microsoft Flow is a tool that can integrate cloud-based apps and services so they interact with each other seamlessly. According to Microsoft, this cloud-based tool improves efficiency and productivity by enabling virtually anyone in an organization to automate many tedious and time-consuming business tasks and processes without developer intervention.

What3Words

what3words provides a precise and incredibly simple way to talk about location. We have divided the world into a grid of 3m x 3m squares and assigned each one a unique 3 word address.

Flic

Flic Buttons are a Smart Button that can be linked to a number of services. The button can be programmed to perform actions via an app or a hub, and can even trigger Microsoft Flows

I know with the Flic button a message with your coordinates can be sent, so I was interested to see if we could Parse that message through Microsoft Flow, run it through the What3Words API then action something with the results.

The resulting flow takes looks like this:

So lets run through it.

Theres a couple of things you need to do with the Flic button to set this up. 

In the Flic App on your phone or other device, you need to setup your connection to Microsoft Flow, and its really important that you choose to send location data:

Once this is done, log in to Microsoft Flow and create a new flow from Blank. You will then be able to add a Flic button as a trigger – the first time you do this, you’ll need to add your Flic account as a connection. You’ll then get to choose which button and which action

Next add an HTTP action. If your connection to Flic is successful, then you’ll have the output from the button press as options to feed in to your HTTP (in this case it is to access the What3Words API ( this is assuming you have already signed up to the What3Words API here and have an API key.

So here we have added the What3Words URI, and as you’ll see added the output from the Flic button as the coordinates. You’ll also need to add your API key as shown in the URI after &Key= and in the Value field.

Once this is completed, the returning JSON needs to be Parsed, so add the Parse JSON action. 

For the Schema, I used the “Use Sample Payload” option and the example on the What3Words Documentation here but just in case, here it is:

{
    "country": "GB",
    "square": {
        "southwest": {
            "lng": -0.195543,
            "lat": 51.520833
        },
        "northeast": {
            "lng": -0.195499,
            "lat": 51.52086
        }
    },
    "nearestPlace": "Bayswater, London",
    "coordinates": {
        "lng": -0.195521,
        "lat": 51.520847
    },
    "words": "filled.count.soap",
    "language": "en",
    "map": "https://w3w.co/filled.count.soap"
}                           

Finally, for this example I took the Parsed data, and added it to an email, but you could just as easily create a record in Dynamics 365 etc

And that should be it! If all works you’ll get lots of lovely ticks on your flow, and an email with your 3 word location, and a link to the map:

The possibilities are endless with these sort of tools. The whole process took less than an hour, and the only “Code” was the JSON payload that I copied and pasted!

Have a go.

About the author

Rob Peledie administrator

1 Comment so far

Fun with Microsoft Flow, What3Words and Flic Button – 365Knowledge – Dynamics365BlogsPosted on6:58 pm - Apr 8, 2019

[…] Fun with Microsoft Flow, What3Words and Flic Button […]

Leave a Reply