Showing results for 
Search instead for 
Did you mean: 
Level: Powered On

Calendar flow issue- updating or deleting older matching appointment

Hi everyone,


For some reason I'm really struggling to get this flow to behave as I'm expecting it to.


The scenario is we have a 3rd party program that will send appointments to a calendar. Now unfortunatley this program doesnt have the ability to send "updates", only "new" appointments. Therefore an updated appointment actually appears as an additional/new appointment.


So the flow I'm trying to create, should when a new appointment is created, search the calendar for exsisting entries with the same subject (the subject is unique to an appointment), and where there is a match, either delete, or at least update the older exsisting appointment, with the new details.


The closest I've got to this, worked in reverse and I've no idea why- ie the latest appointment was updated with the older appointment details.


Does anyone have any suggestions on where we're going wrong?


The flow created is:


Trigger: When a new event is created

Condition: When Subject is equal to *Subject

If yes: Delete event

If No: Create event


and with this I get the failure of "Id is malformed. clientRequestId: 671b6f65-bb38-41f3-9e05-139a2bd00bac serviceRequestId: a305d4f8-88ca-44a1-96bf-f8d76b56f994" and "ActionFailed. An action failed. No dependent actions succeeded."


I can find no way of effectively telling it to delete older event that matches the new event.



Thanks in advance,



Community Support Team
Community Support Team

Re: Calendar flow issue- updating or deleting older matching appointment

Hi @Tom_1,


Could you please share a screenshot of your flow's configuration?


The error message told that the value that you filled within Id field of "Delete event" action is invalid. I think there is something wrong with the flow that you provided. 


I have made a test on my side and please take a try with the following workaround:

  • Add a "When a new event is created (V1)" trigger.
  • Add a "Get events (V1)" action, specify Calendar id.
  • Add a "Filter array" action, From set to output of "Get events (V1)" action, click "Edit in advanced mode", type the following formula:
@equals(item()?['Subject'], triggerBody()?['Subject'])
  • Add a Condition, click "Edit in advanced mode", type the following formula:
@equals(length(body('Filter_array')), 2)
  • Within "If/yes" branch of Condition, add a "Compose" action, Inputs set to following formula:

  Add a "Apply to each" action, input parameter set to output of "Compose" action. Within "Apply to each" action, add a "Delete event" action, specify Calendar id, Id field set to following formula:


Image reference:27.JPG



The flow works successfully as below:29.JPG


Best regards,



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

Helpful resources


Power Automate Community User Group Member Badge

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


Incoming: New and improved badges!

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


Microsoft Learn

Learn how to build the business apps that you need.


Power Platform World Tour

Find out where you can attend!


Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

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