Call Office 365 Service Communications API and Return a Daily Summary of Message Center Notices – Part 5

In part 5, we will now look to create the flow that will populate the nested folder called O365 Notices. More information on the folder structure in part 1.

We will base this post mostly around part 3 as they are very similar in what they do but with a few subtle changes and enhancements.

Please familiarise yourself with part 3 as this post will only discuss the changes required in order to achieve an hourly live update summary.

On the My Flows page, select the Flow you have created from part 3 and choose Save as, now rename the flow to O365 Notices – Daily Update (or similar).

The first modification we will make will be at the beginning to the Recurrence trigger.

We will set it to run daily and a nice enhancement is also to set a start time. You can play around with this to suit but in my environment, having an email drop through like this first thing in the morning means that the engineer who does the daily checks knows about any new notices. They can then decide whether Change Management or the Service Desk need to be made aware of anything on the back of the communication.

So, as we continue through the flow, setting our variables in the same way as we did in part 3, authenticating and making the web  request we then just need to think about filtering the data.

Below is how we will achieve returning only Message Center notices that are not from the Stay Informed category.

@and(not(equals(item()?['Id'], Null)),not(equals(item()?['MessageType'], 'Incident')),not(equals(item()?['Category'], 'Stay Informed')))

@greater(item()?['StartTime'], adddays(utcnow(), -1))

So basically, we are looking for messages that are not incidents and with a MessageType that is not Stay Informed.

You will get an output like below:

You will see the categories Plan for Change and you will also get Prevent or Fix Issues outputting to the HTML table.

So there we have it, you have an update of new Message Center Notices from the last 24 hours. If there are no new notices in the last 24 hours the Flow will succeed but no email will be sent, just like the way it works in part 3 and part 4.

Alan

Part 6 >>>