Skip to main content
Community site session details

Community site session details

Session Id : UMYoIDOREIxet4LeIpS1Da
Power Automate - Building Flows
Unanswered

Odata filter query with body (not working)

Like (0) ShareShare
ReportReport
Posted on 27 Apr 2022 06:26:46 by 8

Hi,

I am trying to use the Get Events (v4) action with an Odata filter query to retrieve and exchange calendar event with a specific 

filter.

pa_1.png

This is returning an error. (probably because the body is Html ?? )

What am I missing with the query  ?  Help please, this is driving me absolutely crazy!
 
Thanks
  • Jonas_K Profile Picture
    5 on 28 Jun 2022 at 11:02:52
    Re: Odata filter query with body (not working)

    I was having the same problem, then I found this other post with a similar question:

    https://powerusers.microsoft.com/t5/Building-Power-Apps/Office365Outlook-V4CalendarGetItems-filter-by-string/td-p/636936 

     

    I think it is answered there, the "body" field of a calendar event cannot be filtered for, and that's why "Invalid filter clause" comes back. They linked this table here, which seems to be for an API before "Graph" and is marked deprecated, but I think it must still apply ?

    https://docs.microsoft.com/en-us/previous-versions/office/office-365-api/api/version-2.0/complex-types-for-mail-contacts-calendar#event 

     

    Here is the "event" object in the current Graph API, they do not show the "Filterable" column any more:

    https://docs.microsoft.com/en-us/graph/api/resources/event?view=graph-rest-1.0 

     

    Please someone correct me if I got something wrong here, or if you know a working solution to filter for the event body in the "Get events (v4)" request. As Claude_fr said, it works if you get all events from a calendar, and then use a "filter array" to match the body contents. But I don't think that's quite the right way to do it, or does it actually do the same in the background as filtering in the request ?

  • VictorIvanidze Profile Picture
    12,554 on 04 May 2022 at 08:49:50
    Re: Odata filter query with body (not working)

    Hi @Claude_fr, it looks like you have selected an improper action.

    Just use Get event (V3) instead.

     

  • v-yujincui-msft Profile Picture
    on 04 May 2022 at 07:22:24
    Re: Odata filter query with body (not working)

    Hi @Claude_fr ,

     

    I have made a test and had the same problem.

    I thought it might be caused by the contains operator is not supporting this Action.

     

    For example:

    Currently, OData filter query operators are limited in Power Automate excel ‘List rows present in a table’ actionOnly single 'eq', 'ne', 'contains', 'startswith' or 'endswith' is currently supported.

     

    vyujincuimsft_0-1651648817586.png

    Maybe that's the reason.

     

    Best Regards,

    Charlie Choi

  • Claude_fr Profile Picture
    8 on 27 Apr 2022 at 18:55:11
    Re: Odata filter query with body (not working)

    pa_4.png

     

    Thx for help 😉

  • VictorIvanidze Profile Picture
    12,554 on 27 Apr 2022 at 12:34:04
    Re: Odata filter query with body (not working)

    Show the output of Get Events (v4)

  • Claude_fr Profile Picture
    8 on 27 Apr 2022 at 11:36:26
    Re: Odata filter query with body (not working)

    Hi @VictorIvanidze 

    It's a 400 error : Invalid filter clause

    pa_3.png

    I don't know the word for the collection 'body' .... body ??

     

    Thx

  • VictorIvanidze Profile Picture
    12,554 on 27 Apr 2022 at 08:05:05
    Re: Odata filter query with body (not working)

    Hi @Claude_fr,

    could you show the error message you get?

  • Claude_fr Profile Picture
    8 on 27 Apr 2022 at 08:04:23
    Re: Odata filter query with body (not working)

    It's possible with a 'For each' and a condition like this :

    pa_2.png

    But I don't undersand whith the formula ( filter query) doesn't work 

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Loading complete