I have managed to get the query category working with the help of the Forum. However, my requirement involves a large number of categories that the BOT needs to skip. Currently, I have a complex query that technically achieves this meaning no error, but I doubt the accuracy, I am seeing a lot of error as far as its still resulting in things I am stating it not to, any way it is also difficult to manage and easy to make mistakes that can result in a bad search or a faulty API request. Here is an example of my query:
"contains(subject, 'Itemized Bills Request') or contains(subject, '2nd Itemized Bills Request') or contains(subject, '2nd Request Itemized Bills Request') and contains(from/emailAddress/address, '@ceris.com') and not categories/any(a:a eq 'BOT Dispatched') and not categories/any(a:a eq 'BOT Extracted') and not categories/any(a:a eq 'BOT Correspondence Created') and not categories/any(a:a eq 'BOT Print Itemized Bill') and not categories/any(a:a eq 'BOT Corvel Uploaded') and not categories/any(a:a eq 'BOT Updated Correspondence') and not categories/any(a:a eq 'In Process to Log') and not categories/any(a:a eq 'In Process to Log/ Hold/ MN') and not categories/any(a:a eq 'In Process to Log/Hold CLM') and not categories/any(a:a eq 'In Process to Log/Hold LF') and not categories/any(a:a eq 'In Process to Log/Hold/CF') and not categories/any(a:a eq 'In Process to Log/Hold/FL') and not categories/any(a:a eq 'In Process to Log/Hold/LM') and not categories/any(a:a eq 'In Process to Log/Hold/NYM') and not categories/any(a:a eq 'In Process to Log/JG') and not categories/any(a:a eq 'In Process to Log/MN') and not categories/any(a:a eq 'In Process to Log/PM') and not categories/any(a:a eq 'In Process to Log/TEAM') and not categories/any(a:a eq 'Completed/Logged') and not categories/any(a:a eq 'Completed/Logged/ LF') and not categories/any(a:a eq 'Completed/Logged/CF') and not categories/any(a:a eq 'Completed/Logged/CLM') and not categories/any(a:a eq 'Completed/Logged/JG') and not categories/any(a:a eq 'Completed/Logged/LM') and not categories/any(a:a eq 'Completed/Logged/MN') and not categories/any(a:a eq 'Completed/Logged/NYM') and not categories/any(a:a eq 'Completed/Logged/TEAM') and not categories/any(a:a eq 'Do Not Process') and not categories/any(a:a eq 'Do Not Process/ Returned to Auditor') and not categories/any(a:a eq 'Do Not Process/Hold/Returned') and not categories/any(a:a eq 'Duplicate')"
Here is it again for visual purpose
âcontains(subject, âItemized Bills Requestâ) or
contains(subject, â2nd Itemized Bills Requestâ) or
contains(subject, â2nd Request Itemized Bills Requestâ) and
contains(from/emailAddress/address, â@ceris.comâ) and not
categories/any(a:a eq âBOT Dispatchedâ) and not
categories/any(a:a eq âBOT Extractedâ) and not
categories/any(a:a eq âBOT Correspondence Createdâ) and not
categories/any(a:a eq âBOT Print Itemized Billâ) and not
categories/any(a:a eq âBOT Corvel Uploadedâ) and not
categories/any(a:a eq âBOT Updated Correspondenceâ) and not
categories/any(a:a eq âIn Process to Logâ) and not
categories/any(a:a eq âIn Process to Log/ Hold/ MNâ) and not
categories/any(a:a eq âIn Process to Log/Hold CLMâ) and not
categories/any(a:a eq âIn Process to Log/Hold LFâ) and not
categories/any(a:a eq âIn Process to Log/Hold/CFâ) and not
categories/any(a:a eq âIn Process to Log/Hold/FLâ) and not
categories/any(a:a eq âIn Process to Log/Hold/LMâ) and not
categories/any(a:a eq âIn Process to Log/Hold/NYMâ) and not
categories/any(a:a eq âIn Process to Log/JGâ) and not
categories/any(a:a eq âIn Process to Log/MNâ) and not
categories/any(a:a eq âIn Process to Log/PMâ) and not
categories/any(a:a eq âIn Process to Log/TEAMâ) and not
categories/any(a:a eq âCompleted/Loggedâ) and not
categories/any(a:a eq âCompleted/Logged/ LFâ) and not
categories/any(a:a eq âCompleted/Logged/CFâ) and not
categories/any(a:a eq âCompleted/Logged/CLMâ) and not
categories/any(a:a eq âCompleted/Logged/JGâ) and not
categories/any(a:a eq âCompleted/Logged/LMâ) and not
categories/any(a:a eq âCompleted/Logged/MNâ) and not
categories/any(a:a eq âCompleted/Logged/NYMâ) and not
categories/any(a:a eq âCompleted/Logged/TEAMâ) and not
categories/any(a:a eq âDo Not Processâ) and not
categories/any(a:a eq âDo Not Process/ Returned to Auditorâ) and not
categories/any(a:a eq âDo Not Process/Hold/Returnedâ) and not
categories/any(a:a eq âDuplicateâ)â
I also have to do this in search instead of getting a bunch of emails and then looping the email list to remove, its part of my requirement, also doing that way , we will just search the same email again and again due to bot runs every 10 minutes or so.
My hope is to shrink the category matching to like 5 types instead of 30+
something like categories/any(a:a contains âDuplicateâ)
which doesnât work
Only combination of categories query format that works for me is this
"categories/any(a:a eq âDuplicateâ)"
which is why I did this long format.
Below are nonworking examples of my attempts, bad filter per UiPath error log - you can see what I am trying to do
"contains(from/emailAddress/address, '@elementblue.com') and not startsWith(categories/any, 'BOT')"
"contains(from/emailAddress/address, '@elementblue.com') and not contains(categories/any(a:a eq, 'In Process'))"
Also seems like after the âand notâ is not working completely , if my query is simply
"contains(subject, 'Itemized Bills Request') or contains(subject, '2nd Itemized Bills Request') or contains(subject, '2nd Request Itemized Bills Request') and contains(from/emailAddress/address, '@elementblue.com') and not categories/any(a:a eq 'BOT Dispatched')"
It is still bringing in emails that have category âBOT Dispatchedâ, why is that?
just this works , but not when I chain it?
not categories/any(a:a eq 'BOT Dispatched')"