cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
tcsmith11
Regular Visitor

Get Emails v3 Search Query Returns unexpected results that do not match the query

Hello, I'm looking for help understanding some unexpected query results. 

In Get Emails v3, my query is designed to look for email over 3 days old with various subjects and take an action (ie: delete or move to another folder).  The action works fine but the problem is the query output includes messages that do not match the query (at least I don't think they do) and I'm looking for tips/direction:

 

Get Emails v3 Search Query:

received<=@{formatDateTime(addDays(utcNow(),-3),'yyyy-MM-dd')} AND (subject:('Recent and Upcoming Change Requests') OR ('Change requests scheduled') OR ('Response SLA for'))

 

Emails with the queried phrases in the subject line are returned as expected.
Emails with these complete subjects are also returned (as viewed in raw outputs) after running the flow:

"RE: SLA Breach"

"Updated DR Plan"
"RE: Annual CIO Award Nominations"

 

Any ideas why my query is returning those? 

TIA -Tracy

1 ACCEPTED SOLUTION

Accepted Solutions
Expiscornovus
Super User
Super User

Hi @tcsmith11,

 

I believe in the last part of your expression with the 'Change requests scheduled' & 'Response SLA for' you are also searching within the from and body fields:

https://docs.microsoft.com/en-us/graph/query-parameters#search-parameter

 

Try and use this expression:

received<=@{formatDateTime(addDays(utcNow(),-3),'yyyy-MM-dd')} AND (subject:('Recent and Upcoming Change Requests') OR subject:('Change requests scheduled') OR subject:('Response SLA for'))

View solution in original post

2 REPLIES 2
Expiscornovus
Super User
Super User

Hi @tcsmith11,

 

I believe in the last part of your expression with the 'Change requests scheduled' & 'Response SLA for' you are also searching within the from and body fields:

https://docs.microsoft.com/en-us/graph/query-parameters#search-parameter

 

Try and use this expression:

received<=@{formatDateTime(addDays(utcNow(),-3),'yyyy-MM-dd')} AND (subject:('Recent and Upcoming Change Requests') OR subject:('Change requests scheduled') OR subject:('Response SLA for'))

View solution in original post

Of course.... Thank you so much!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,117)