I am attempting to retrieve emails using various search parameters, including category. However, I have been unsuccessful in getting any of the query combinations below to work properly. Only one of them executes without throwing a bad request error, but it returns 0 results, which is incorrect (as shown in the screenshot). This issue persists regardless of the number of categories attached to each email. Ideally, I would like to use a longer search parameter that includes subject, sender, and multiple categories.
Here are the queries I have tried so far:
“contains(subject, ‘Test Email, Azure token’) and contains(categories, ‘BOT Pending’)”
“contains(subject, ‘Test Email, Azure token’) categories eq ‘BOT Pending’”
“contains(subject, ‘Test Email, Azure token’) and categories eq ‘BOT Pending’”
“contains(subject, ‘Test Email, Azure token’) and categories(c:c eq ‘BOT Pending’)”
“contains(subject, ‘Test Email, Azure token’) and categories/any(c:c eq ‘BOT Pending’)”
only the last one(bolded) worked but with zero results, I searched the inbox, and here is the screen shot of the inbox
i have working simple queries that search from and subject to test the activity works, which works so I know its the query
Here are my dependencies, I do use one of the latest studio with a windows project not legacy.
Main Questions
- Please assist me in constructing the correct query to retrieve emails based on category.
- I need to retrieve emails by searching for multiple categories, such as “Blue Category” and “BOT Pending,” similar to what is shown in my screenshot.
- I would like to retrieve emails by searching for multiple categories, as well as specifying a specific subject and sender email address. I have successfully implemented the search for subject and sender email separately, but not in combination with the categories.