My first Power Automate (Flow) application

Meeting with Flow

Through my brief journey with Dynamics 365 I’ve encountered expressions like PowerApps, Flow and how good it is to fuse them together.

That made me investigate these topics through Microsoft’s e-learning documents. I learned that there are free, downloadable mobile apps related to them. It was interesting for me to see the result immediately on my phone, of what I’ve created on desktop.

After reading a few documents about Microsoft Power Automate – formerly known as Flow – I started thinking about how I could use it. There are hundreds of templates for various uses, so you can easily get inspired.

At first, I created one from the “Get today’s weather forecast for my current location” template. I modified it to get tomorrow’s weather forecast instead, but I wanted to create my own flow.

The idea of the Flow

I thought out a flow that sends a Push notification to your phone through the Flow app, whenever a new event is added to the Outlook calendar. I’m quite sure that there is a function similar to this one in the official Outlook app, but it was good for practicing purposes.

The execution

It was fairly straightforward to choose the trigger and the action. I just added the necessary fields from the dynamic content and filled the sentence out with my text.

Base structure of the flow

The notification informs you about the event’s subject and organizer, the start and the end time of the event.
I formatted the dates, so that they were displayed like ’01/22 12:00 AM’.
See below the code that achieves this format.
formatDateTime(triggerBody()?['start'],'MM/dd hh:mm tt')

I tested the flow and it worked, so I thought about making it a bit more complex. I wanted to get notifications only on weekdays, so to achieve that I had to add conditions to my flow.

After messing around with it and googling a bit I created these 2 conditions.

The conditions

If it isn’t the 6th or 0th day of the week – so Saturday or Sunday – then just jump right to the notification action. If it’s Saturday then the notification should be delayed by 2 days, or if it’s Sunday then delay the notification by a day.

Below is the expression for the condition.
dayOfWeek(formatDateTime(triggerBody()?['createdDateTime'],'D'))

Structure of the whole flow

The result

The notification that appears on your phone should look something like this

The notification

I was able to create this simple function within hours after I started reading related e-learning documents. You can find a lot more educational material about Power Automate on https://docs.microsoft.com/en-us/learn/browse/?products=power-automate.

Leave a Reply

Your email address will not be published. Required fields are marked *