Microsoft Flow was introduced a couple of years ago, and covered in ToW #401; it’s basically a glue between different online applications, allowing the exchange of data between them and being driven by events and actions.
Many of the templates for Flow are quite esoteric – when a tweet on a particular topic appears, write a log to a Sharepoint site and send a notification to a Teams channel, that kind of thing. But there are plenty of really useful connectors that can be combined in time-saving ways; here’s a really handy way of bringing traditional data sources into the modern era: an email parser, called Parserr.
After signing up with Parserr – free if you only need a few uses per month – you can then crack open mail that is consistent in format and contains some information you’d like to extract and use elsewhere, such as confirmation of an appointment or maybe a travel booking. In practice, you get given an inbox with a unique email address within Parserr and you’d set up a rule in Office365 or Outlook.com to send mails that meet some inbox rule to that address, where it would be parsed for you and key data fields then sent back to Flow.
e.g. if email comes from a specific source address or it has a subject that indicates it’s a particular type of reservation, then forward to your email@example.com inbox address, extract the details of the booking then do something with them within Flow.
Create a rule for each piece of information you want to extract, and it will effectively create a field:
Once set up, you create the Flow by choosing the connectors for Parserr and whatever other applications you need to work on the information.
In this example, we’re using Office 365 to create an appointment that matches a reservation – the arrival and departure dates are provided by the source email, and converted to YYYY-MM-DD format within Parserr, then dragged across in Flow to match the Start & End times of an “event”. We’ll tack on T16:00 to the arrival time and T10:00 to the departure as that’s the check in and check out times, and thus create an ISO8601-compliant date/time such as 2019-04-05T08:00, which Office365 will use as the start or end time of an appointment.
“Advanced options” gives you further control (such as adding body text that might contain static text and other fields provided by Parserr, other addresses to forward the invite to, setting if you want it to be free/busy/tentative, reminder duration, time zones etc).
And that’s it: you can test the logic is working within each system – in Parserr, you can continually re-run the processing of your initial sample mail until you know the data is being extracted as you’d like, and within Flow you can keep testing your formatting etc by either triggering a new input or by working with the last set of data that came over from the source.
Once you’re happy just save the Flow, and it will automatically create an appointment in your calendar every time you get a matching email forwarded to the Parserr system – all in a few seconds.
We all get notified of stuff that we’re probably interested in, but which we never get around to reading about in-depth, or trying out. Well, this week’s topic presents both an example of exactly that (for some of us at least) and a potential solution to it – Microsoft Flow, a free-to-use, simple*, workflow tool that can stitch all kinds of things together in a useful manner.
* some may take issue with “simple”. Bah.
Flow promises to do all sorts of groovy things that nobody ever needs, like writing every email to a Google Sheet then sending your calendar a reminder to look at it. But there are lots of potentially interesting and useful things you can put together, either by using the many templates or by building your own custom flow based on simple logic. You could connect all kinds of disparate web-based services together and using triggers, fire off actions based on events happening – like a tweet about a particular topic, or a new event added to a calendar.
Let’s take an example – say, you have an Office 365 work mail account and associated calendar. When you put something in your calendar which is both an all-day event, and is also marked “Out of the Office”, that probably means you’ll be out of the office all day, maybe away on a business trip or possibly even on holiday.
Wouldn’t it be useful to be able to copy that to a calendar that your nearest and dearest can see, maybe even adding all the events from several family members into one place, shared with all the others?
First off, you may want to log into www.outlook.com, go into Calendar and create a new shared calendar (if you don’t have one already) – give it a suitable name (like Family Calendar) and then make sure you’re sharing it with the right people you’d like to be able to see it. They will get an invite to see the shared calendar and it will be added to their own Outlook.com calendar view (as pictured way below).
Now, to create the flow to copy stuff from your work to Family Calendar…
Now you should be able to see any new, all-day events that appear in your work calendar, showing up in your shared Outlook.com custom calendar.
A further refinement might be to add a condition to only trigger the sync when the original meeting is set to “Out of Office” – click on Update flow to edit, then add another step, Add a condition then add Show as equals 3 – that’s the field that denotes the event’s status (busy, free etc), and “3” is the value that means “out of office”.
It’s worth having a play around with Flow, as you can do some interesting things with it (and there are connectors for all kinds of services, including Google mail & calendar, Wunderlist tasks, even grown-up apps like Dynamics or Salesforce. There are mobile apps that can take part in flows, too); do bear in mind that it takes anything up to a few minutes to fire these kinds of events, and if there’s a problem running your logic, then you’ll be notified.
It may be worth adding a debug step that can be easily removed later, by getting the flow to send you an email with the values of the fields you’re interested in…