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 II
Super User II

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 II
Super User II

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
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Top Kudoed Authors
Users online (53,932)