Skip to main content

Notifications

Community site session details

Community site session details

Session Id : +P/BkTcb3mQMIbdMDqCdRM
Power Automate - General Discussion
Unanswered

Conditional Event Creation - Schedule Conflict Search

Like (0) ShareShare
ReportReport
Posted on 15 Mar 2024 21:36:41 by 6

New to power automate so please be gentle! I am stuck trying to automate a calendar reservations workflow. When a reservation request form comes in, I want it to automatically check for current scheduled reservations for this location on this date requested BEFORE creating an event.

 

The automation I have now, does everything I need it to except for actually filter the events for this information and everything I try either fails or does not retrieve the information.

 

I have Get Events with a filter of "subject eq "request location from form"

Then I Filter Array the outputs and say the Event Start Time is equal to "reservation request date from form, formatted for outlook"

Last I set Conditional Control so that if Get Events = 1 and Filter Array = 1, then TRUE

This starts the path of whether to create event or reject reservation form.

 

See attached images of current flow. 

 

I am sure there is an easier way but I have been battling this for a month now. I purposefully have an current reservation on the date when testing but the flow absolutely does not want to pull it to appropriately finish flow.

  • clachance Profile Picture
    6 on 20 Mar 2024 at 20:37:22
    Re: Conditional Event Creation - Schedule Conflict Search

    @Nived_Nambiar 

     

    I am so close now! That got me further - I am at least returning proper outputs from the Get List View of Events.

     

    The issue now is the conditional flow... I tried every possible combination of statements I could and it ALWAYS returned false expression (even if it was "true").

     

    Outputs is greater than or equal to 1

    Outputs is equal to 1

    Outputs is equal to Null

    Outputs contain "Park Location from Form"

    Body/Value is equal to Null

     

    I am stuck trying to figure out now how to get conditional statements based on the outputs from get events now...conditional failed.png 

  • Nived_Nambiar Profile Picture
    17,554 Super User 2025 Season 1 on 20 Mar 2024 at 17:11:41
    Re: Conditional Event Creation - Schedule Conflict Search

    Hi @clachance 

     

    ok got it. Then i think it is the issue with filter query which you have provided. as subject eq  will check for exact match , but in your case you should be checking whether the event subject contains rather than equals.

     

    https://rakhesh.com/power-platform/playing-with-power-automate-and-calendar-events/

    Refer above link on how to use contains filter query

    Nived_Nambiar_0-1710954693330.png

     

     

    Hope it helps !

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

  • clachance Profile Picture
    6 on 19 Mar 2024 at 18:07:53
    Re: Conditional Event Creation - Schedule Conflict Search

    @Nived_Nambiar 

     

    Yes - well partially. I have the events created with details from the form to include the Park location in the event subject.

     

    The automation won't and shouldn't search for the same park location and/or date each time. The filter should change each time a new reservation form comes in. The filter search will vary depending on which park and date is on the form to search. It is not a static search each time. 

     

    Event Subject Structure taken from Cognito Form input: 

    (Approval Status) Park Location: Customer Last Name

     

    Example event subject:

    (Awaiting Payment) Sarah Benson - Lower Pavilion: Smith

     

    Just for informational purposes, I do have a second automation that runs when the status of the form changes to update the event. This automation works just fine since I do not have to search for conflicts to run this one.

  • Nived_Nambiar Profile Picture
    17,554 Super User 2025 Season 1 on 18 Mar 2024 at 17:24:55
    Re: Conditional Event Creation - Schedule Conflict Search

    Hi @clachance 

     

    actually i could see problem starts at get events where you are filtering by subject, does that event with that subject exists ?

     

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

  • clachance Profile Picture
    6 on 18 Mar 2024 at 13:47:21
    Re: Conditional Event Creation - Schedule Conflict Search

    @Nived_Nambiar 

     

    The date on reservation form does not include times as they are all day event reservations. So on the form it just has user select calendar date - mm/dd/yyyy. 

     

    I have a compose action as step 2 and 3 that formats the date into correct outlook format and then another compose action to add 23 hours for end time so the automation can create and all day event (if i can ever figure out the schedule conflict checking situation).

     

    The problem I think lies in the fact that the currently scheduled events on the calendar are marked all day, so Im wondering if using the filter query on Get Events works properly when searching for event by date. In my head, that is why I feel like it is failing. 

  • Nived_Nambiar Profile Picture
    17,554 Super User 2025 Season 1 on 16 Mar 2024 at 07:38:41
    Re: Conditional Event Creation - Schedule Conflict Search

    Hi @clachance 

     

    does the date includes time when submitting details from form ?

     

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank 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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - General Discussion

#1
rpersad Profile Picture

rpersad 16

#2
David_MA Profile Picture

David_MA 10 Super User 2025 Season 1

#3
Michael E. Gernaey Profile Picture

Michael E. Gernaey 8 Super User 2025 Season 1

Overall leaderboard