Using "Get Mail Messages" activity to get messages within past 10 minutes

Hi all, I’m currently trying to use the Get Mail Messages activity to return any emails (with the specified subject) within the past 10 minutes.

I can get emails within the past day, but I cannot figure out the formatting for minutes.
"subject:EXAMPLE SUBJECT is:unread after:"+Now.AddDays(-1).ToString(“yyyy/MM/dd”)

Any help there would be great.

Thanks!

try using Now.AddMinutes(-10) instead of Now.AddDays(-1)

Hello @Shane_Curran
Try this

DateTime.Now.AddMinutes(-10)

thanks for that, however, it doesn’t seem to be working. When I do not include HH:MM:ss it returns all results, and with HH:MM:ss it doesn’t return any.
Any ideas? Thanks!

"subject:Your EXAMPLE SUBJECTis:unread after:"+DateTime.Now.AddMinutes(-10).ToString(“yyyy/MM/dd HH:MM:ss”)

Try this

"subject:Your EXAMPLE SUBJECTis:unread after:"+DateTime.Now.AddMinutes(-10).ToString(“yyyy/MM/dd HH:mm:ss”)

Must likely because time is not supported in SearchExpression

Cheers

ah ok, yeah I think that makes the most sense. I’ll have to find a work around for my process in that case. Thanks!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.