cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
MAW
Level: Power Up

OData filters on O365 Events

Hi MVP's and other Flow experts,

 

I am starting out with Microsoft Flow and would like help creating a flow that gets upcoming events (in Office 365) and email that asks for them to provide input to agenda items.

 

The piece I am struggling with is how I filter the 'get Events' action to filter on 1) events I host, 2) within the date range e.g. 7 days ahead. And then, how I handle cases where I have multiple events that meet this criteria.

 

I'm grateful for any help you can offer - 

M 🙂

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: OData filters on O365 Events

Hi @MAW ,

 

You could use Filter array to filter out eligible events.

  • Determine if the email address of Organizer is the same as yours.
  • Use addDays() function to add the current date to 7 days and format the event startTime using formatDateTime() function, then compare the two dates for equality.
  • Use and() function to combine these two conditions.

Image reference:

1.PNG

Expression reference:

@and(equals(formatDateTime(item()['Start'], 'yyyy-MM-dd'), addDays(utcNow(), 7, 'yyyy-MM-dd')),equals(item()?['Organizer'], 'Test@org.com'))

2.PNG

 

Please take a try.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Community Support Team
Community Support Team

Re: OData filters on O365 Events

Hi @MAW ,

 

You could use Filter array to filter out eligible events.

  • Determine if the email address of Organizer is the same as yours.
  • Use addDays() function to add the current date to 7 days and format the event startTime using formatDateTime() function, then compare the two dates for equality.
  • Use and() function to combine these two conditions.

Image reference:

1.PNG

Expression reference:

@and(equals(formatDateTime(item()['Start'], 'yyyy-MM-dd'), addDays(utcNow(), 7, 'yyyy-MM-dd')),equals(item()?['Organizer'], 'Test@org.com'))

2.PNG

 

Please take a try.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (5,481)