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 >>>

 

Related Post

Flow: So Where has “Edit in advanced mode... Below is an image of the new format for conditions in Flow. Look at the no code control we have here with real conditional logic. What in improvement ...
Call Microsoft Graph Organization Scope to Check L... Within any organization who run a hybrid Office 365 setup, AAD Connect has a sync cycle of 30 minutes (default) and unless someone is on one of the sy...
Call Office 365 Service Communications API and Ret... In part 4, we will now look to create the flow that will populate the nested folder called Live Updates. More information on the folder structure in p...
PowerShell Office 365: SMTP Email Sent with PowerS... In this example, I have an extremely simple function called MyCode. The purpose of the function is only to demonstrate us taking any PowerShell output...