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 Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Users online (1,537)