Let’s say you get emailed a random daily automated report between 3am-11am and you want to be alerted if you did NOT receive that email
In my example my daily report always has this specific email subject:
- Daily Automated Report
The first step is to create a scheduled flow and I will set it up to run daily around 11 AM
Next I will create an action called Get emails
Here is my expression code for the Search Query:
getPastTime(8, 'Hour')
The above expression means filter by the current time MINUS 8 hours so if it is 11 AM this filter will find any email between 3AM-11AM
Then under advanced options there is Subject Filter which will only return an email if the subject matches the criteria entered
For the next action create a compose action and enter the following expression:
length(outputs('Get_emails_(V3)')?['body/value'])
Then I created a condition saying if the output of the above express is equal to 0 then send an email because that means it did not find one
Reference: