I have set up a Flow using Recurrence as a trigger in a list containing items with a Date and an UpdateEmailRecipientsDate (which is a calculated column 7 days prior to the Date column). Because I could not use the UpdateEmailRecipientsDate directly in the Get Items (due to it being a calculated date and throwing an error), I stumbled on a post on this Forum suggesting a Filter Array might be a solution (though that post was for a library and not a list).
My Flow is as follows: Reccurrence (daily at 7 a.m.; I did select a time zone) > Get Items > Filter Array > Send an Email. The email should not send if there are no items where the UpdateEmailRecipientsDate is not equal to the current date. As set up, the Flow is sending out an email even when there is no entry with the UpdateEmailRecipientsDate equal to the current date (almost as if it is always reading the filter array as being true).
I have used the following expression to format utcnow for the comparison:
Hello @Anonymous
You should not need the Filter Array action! You should be able to use the Filter Query field in the Get Items action like this:
<your date field real name> gt '<expresssion: formatDateTime(addDays(utcNow(),-7),'yyyy-MM-dd')>'
Note that there are single quotes around the expression!
Try it out and tell us how it went.
You will have to add a Condition action before your Send an email notification, in which you test that items where found 🙂
length(body('Get_items')?['value'])
Kind regards, John
User | Count |
---|---|
6 | |
6 | |
5 | |
4 | |
2 |
User | Count |
---|---|
11 | |
9 | |
8 | |
7 | |
4 |