web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Filter Outlook Events ...
Power Automate
Unanswered

Filter Outlook Events by Categories

(0) ShareShare
ReportReport
Posted on by 19

Hi everyone, 

 

I am trying to build a flow that will check my Outlook calendar for the current day and create a task in To-Do for every meeting I have today that has no Category because I don't want to see the events I've categorized in my calendar such as Focus Time (Green Category) or Lunch (Purple Category) etc. in my To-Do's. 

 

I've already tried typing below expressions for the Filter Query field but none of them worked:

  • categories eq "[]"
  • categories eq []
  • "categories" eq "[]"
  • "categories" eq []
  • categories eq "false" (... and all other combinations with and without quotation marks)
  • categories eq "Green Category" --> to see if I can retrieve events with category.

Could you please check my flow below and give feedback on how to use the Filter Query functionality?

 

Outlook Events Filter Query by Category_Melike Askin.PNG

 

P.S. My flow works just fine without applying Filter Query. It runs every midnight and creates To-Do's in my designated list for the current day's events but I would like to only see the events with no category, like this event:

Outlook Events Filter Query by Category_Melike Askin (2).PNG

 

Thanks!

Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,189 Most Valuable Professional on at

    Hi @melikeaskin,

     

    Categories is an array, which makes a bit more challenging in an OData filter query 😁

     

    I just tested and this format seems to work for checking if the Green category is assigned. Keep in mind that it is case sensitive. I am still looking at the check for empty

     

    categories/any(c:c+eq+'Green category')

     

  • Verified answer
    melikeaskin Profile Picture
    19 on at

    Hi @Expiscornovus

     

    I tried filtering by Green Category (C is upper case 🙂) like your solution, and it worked.

     

    I think I also found a workaround. Since I only have max 10 items in my calendar in a regular day, I did not apply Filter Query to Get calendar view of events but added a condition to create a To-Do only if Categories does not contain either of the categories. 

     

    Outlook Events Filter Query by Category_Melike Askin (3).PNG

  • melikeaskin Profile Picture
    19 on at

    This flow actually works. I only get events with no category with this flow right now.

     

    @Expiscornovus, My question is, do you think this solution makes sense? Would it cause any problems in the future?

     

    Thanks a lot!!

  • Verified answer
    Expiscornovus Profile Picture
    33,189 Most Valuable Professional on at

    Hi @melikeaskin,

     

    The solution should work, nicely found. Only challenge will probably be that you need to update the flow whenever you introduce a new category in your Calendar.

     

    Another approach could be to use a filter array and check if the categories field is empty.

     

    empty(item()?['categories'])

     is equal to true

     

    filterarray_emptycheck.png

  • melikeaskin Profile Picture
    19 on at

    Hi @Expiscornovus,

     

    When I used a filter array and check if the categories field is empty I still got all events including events with a category. 

    Outlook Events Filter Query by Category_Melike Askin (4).PNG

     

    Is this what you mean? Thanks!

  • Expiscornovus Profile Picture
    33,189 Most Valuable Professional on at

    Hi @melikeaskin,

     

    The filter array setup looks ok.

     

    Just to double check, what is the rest of your setup. Are you using the outputs of your filter array action in your apply to each loop?

     

    applytoeach_filterarray.png

  • MLachanceDFG Profile Picture
    4 on at

    I am looking to do the same but cannot get this solution to work. When I copy and paste

    categories/any(c:c+eq+'Green category')

     into my filter query box and I change it to my category name, I still get an invalid query syntax error. Am I missing something?

  • melikeaskin Profile Picture
    19 on at

    Hi @MLachanceDFG, the expression is case sensitive. Please don't forget to write "Green Category" instead of "Green category". 

     

    Dear @Expiscornovus, I fixed my flow by using the outputs of the filter array action in next steps i.e. apply to each loop. Flow works, but for some reason for all meetings with no category are created as To-Do's but one meeting gets created as To-Do twice every time.

     

    I continued with the condition scenario and it works for now 🙂 I will edit the condition in the future if I add a category. 

     

    Thanks!

  • MLachanceDFG Profile Picture
    4 on at

    Unfortunately, it doesn't seem to matter what I type in for my category name, the syntax of the function itself is not being accepted as you've written it. Are you doing something advanced with it that you haven't detailed? I'm not understanding why the expression isn't valid if it's working for both of you.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard