Skip to main content

Notifications

Community site session details

Community site session details

Session Id : pEfSpNJ1Rm28+euGFGPC3t
Power Apps - Building Power Apps
Unanswered

Office 365 Outlook - Get Events (V4) and recurring/series events

Like (0) ShareShare
ReportReport
Posted on 18 Jun 2021 22:34:26 by 101

I use the following filter query to retrieve all events from my Calendar that took place on 6/14/2021 UTC-8:

 

start/dateTime ge '6/14/2021 8:00 AM' and end/dateTime le '6/15/2021 8:00 AM'

 

 

 Where the start and end times are provided through PowerApps variables.

 

The issue is that this query doesn't retrieve any events that are part of a series with a start/end date outside this range . e.g. for 6/14/2021, I had 3 single events, one daily recurring event from 6/14 to 6/16, and one daily recurring event from 6/1 to 6/30. The first 4 events were correctly retrieved, but the final one wasn't. 

 

I tried switching around the operators to:

 

start/dateTime le '6/15/2021 8:00 AM' and end/dateTime ge '6/14/2021 8:00 AM'

 

 

but it made no difference. 

 

How do I adjust my filter so that it retrieves ALL events for a given day?

  • XavierP Profile Picture
    23 on 16 Jul 2024 at 15:41:53
    Re: Office 365 Outlook - Get Events (V4) and recurring/series events

    Hello @francescjp ,
    I have a similar problem with my app. I'm trying to retrieve events from my Outlook calandar into a gallery in power apps. Heres what I have for now which is not working.

    App.OnStart = 

    Set(varCalendrier; LookUp(Office365Outlook.CalendarGetTablesV2().value; name = "Calendrier"; id));;
    Set(varStartDate; StartDatePicker.SelectedDate);;
    Set(varEndDate; EndDatePicker.SelectedDate);;
    Set(varISOStartDate; Text(varStartDate; "yyyy-mm-ddThh:mm:ssZ"));;
    Set(varISOEndDate; Text(varEndDate; "yyyy-mm-ddThh:mm:ssZ"));;
    *varCalendrier returns a string and 
    Office365Outlook.CalendarGetTablesV2().value returns all my calendar from my Outlook profil, and "Calendrier" is the one I want to appear in my gallery.*

    Btn_Rech.OnSelect = 
    Set(varEvents; GetEventOutlook.Run(varISOStartDate; varISOEndDate));;

    Gallery1.Items = varEvents
     
    Labels in my gallery:
    Lbl_Start.Text = "Start : " & ThisItem.varstartdate
    Lbl_End.Text = "End : " & ThisItem.varenddate
     
    I also have 2 date picker controls one called "StartDatePicker" and "EndDatePicker".
     
    Heres my Power Automate Flow called GetEventOutlook:
    Power Apps (V2)
    Type: Text
    Name: varISOStartDate
    Value: varISOStartDate / @{triggerBody()['text']}

    Type:Text
    Name: varISOEndDate
    Value: varISOEndDate / @{triggerBody()['text_1']}
     
    Get events (V4)
    Calendar ID: Calendrier
    Filter query: start/Datetime ge @{triggerBody()['text']} and end/Datetime lt @{triggerBody()['text_1']}
    Filter by: start/dateTime desc
     
    Respond to a Power App or flow
    Type: Date
    Name: varStartDate
    Value: @{triggerBody()['text']}
     
    Type: Date
    Name: varEndDate
    Value: @{triggerBody()['text_1']}
     
    Now when I select "July 16 2024" in StartDatePicker and "July 30 2024" in EndDatePicker then I execute my flow I get this error message: "Invalid filter clause: A binary operator with incompatible types was detected. Found operand types 'Edm.String' and 'Edm.DateTimeOffset' for operator kind 'GreaterThanOrEqual'."
     
    In "Gallery1.Items = varEvents_" where theres the "_" it shows an error that is saying:
    "GetEventOutlook.Run failed : {
    "error": {
    "code": 502,
    ...
     
    I don't understand why it doesn't convert my text input into ISO 8601 then find the events in the calendar and show them in my gallery.
     
    Thanks.
  • francescjp Profile Picture
    158 on 30 Apr 2024 at 08:04:56
    Re: Office 365 Outlook - Get Events (V4) and recurring/series events

    Hello:

     

    I think it would be a good solution.

     

    start/Datetime ge '@{startOfDay(utcNow(),'yyyy-MM-ddTHH:mm:ssZ')}' and end/Datetime lt '@{startOfDay(addDays(utcNow(),1,'yyyy-MM-ddTHH:mm:ssZ'))}'

     

    Mark it as a solution if it works please.

    Thank you.

     

    Have a good day.

  • Al_10 Profile Picture
    1,691 Super User 2024 Season 1 on 20 Jun 2021 at 20:41:49
    Re: Office 365 Outlook - Get Events (V4) and recurring/series events

    @alex93jansen 

    do you retrieve calendar events with Power Automate?

    i think you need to use 'Get calendar view of events (V3)' action to get recurring events.

     

    in powerapps for example, 

    Office365Outlook.V4CalendarGetItems() does not return recurring events, 

    Office365Outlook.GetEventsCalendarViewV3() returns all events including recurring.

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,653 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,999 Most Valuable Professional

Leaderboard
Loading started
Loading complete