Hi There,
I'm trying to create a Flow to delete messages older than 7 days in Folder, but I have a problem.
This is my Flow:
When in the field Search Querry I add "received:yesterday", the flow is working, and the messages are successfully processed, but when I add "received:last week" not working.
This is the output:
This is the output with "received:last week" in the query:
I tried to add the search query in double quotes, but in this case, the flow fails.
in the email folder, there is a lot of messages from the last 10 days (02 to 11 of April)
One more question - into the TOP field in "Get emails" step, I'm trying to put more than 25 items, but in this case, the Flow fails again. Is there a limitation for this?
Thanks in advance for any idea,
Krasimir
Hi @Krasimir ,
Please consider directly comparing the current time and the time the message was received, and then delete the eligible email.
Expression reference:
formatDateTime(item()['DateTimeReceived'],'yyyy-MM-dd')
addDays(utcNow(),-7,'yyyy-MM-dd')
Image reference:
Please take a try.
Best Regards,
stampcoin
23
Pstork1
20
Most Valuable Professional
Gprior
19