cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

How to delete calendar event using microsoft flow

Hi All,

 

Created a flow for sharepoint custom list, i am sending a outlook calendar invitation to createdby user using flow with Create event(V2)  action,

can you suggest me how to delete or midify the created event using flow in outlook calendar.

 

Thanks,

Raghava.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: How to delete calendar event using microsoft flow

Hi @RaghavaReddy,

 

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

Could you please share a bit more about your SharePoint list?

 

I agree with @8BitWarrior's thought almost, you could add a custom column (Event ID column) within your SharePoint list to store the Outlook Event Id of the new created event.

 

When a new event is created in your Outlook calendar, then write back the event id into the Event ID column. When an item is modified in your SharePoint list, find the specific event within your Outlook calendar based on the Event ID column value and then update the event. When an item is deleted in your SharePoint list, find the specific event within your Outlook calendar based on the Event ID column value and then delete the event from your Outlook calendar.

 

I have created a SharePoint list on my side and the data structure of it as below:8.JPG

Note: The Event ID column is a Single line of text type column, which is used to store the event id of the new created Outlook event. The default value of this column is empty. The ManuallyModify column is a Yes/No type column (Default value of it is No), which is used to check if the user modify this item. When the user modify this item. set the ManuallyModify column to Yes manually.

 

  • When a new item is created (or modified) in your SharePoint list, create an new event (or modify an existing event) in your Outlook
  1. Add a "When an item is created or modified" trigger, specify Site Address and List Name.
  2. Add a Condition, click "Edit in advanced mode", type the following formula:

 

@empty(triggerBody()?['Event_x0020_ID'])

    3. Within "If/yes" branch of Condition, add a "Create event (V2)" action, specify Calendar Id. Then add a "Update item" action, specify SIte Address and List Name, Event ID field set to Id dynamic content of the "Create event (V2)" action.

    4. Within "If/no" branch of Condition, add a Condition 2, click "Edit in advanced mode", type the following formula:

 

@equals(triggerBody()?['ManuallyModify'], true)

Within "If/yes" branch of Condition 2, add a "Get events (V2)" action, specify Calendar Id. Add a "Filter array" action, From set to output of the "Get events (V2)" action, click "Edit in advanced mode", type the following formula:

 

 

@equals(item()?['Id'], triggerBody()?['Event_x0020_ID'])

The add a "Apply to each" action, input parameter set to output of the "Filter array" action. Within "Apply to each" action, add a "Update event (V2)" action, specify Calendar Id, Id field set to Id dynamic content of the "Filter array" action. Under "Apply to each" action, add a "Update item 2" action, specify Site Address and List Name. the ManuallyModify field set to No.

 

 

Image reference:9.JPG

 

10.JPG

 

11.JPG

The flow works successfully as below:12.JPG

 

 

 

  • If you want to remove corresponding event from your Outlook calendar when an item is deleted from your SharePoint list, I afraid that there is no way to achieve your needs in Microsoft Flow currently.

 

 

Best regards,

Kris

 

 

 

 

 

 

 

 

 

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.

View solution in original post

4 REPLIES 4
Highlighted
Advocate II
Advocate II

Re: How to delete calendar event using microsoft flow

I am currently setting up a workflow with the same intention. I have a SharePoint list that will trigger a flow and create calendar events. However, currently there is no way that I can see to actually use the Delete Event V2 or Delete Event actions in Flow.

 

In order for you to use those actions you are required to provide the ID of the calendar event. Here is part that is broken, while I can send the ID of the created calendar event back into my SharePoint list item, there is no way for me to select it to populate the required ID field.

The same applies to Update Event V2 - this cannot be used as you have no way to populate the requried ID field with the information you need.

Hopefully these actions will be fixed soon.

 2018-05-08 11_29_21-Edit your flow _ Microsoft Flow.png

Highlighted
Community Support
Community Support

Re: How to delete calendar event using microsoft flow

Hi @RaghavaReddy,

 

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

Could you please share a bit more about your SharePoint list?

 

I agree with @8BitWarrior's thought almost, you could add a custom column (Event ID column) within your SharePoint list to store the Outlook Event Id of the new created event.

 

When a new event is created in your Outlook calendar, then write back the event id into the Event ID column. When an item is modified in your SharePoint list, find the specific event within your Outlook calendar based on the Event ID column value and then update the event. When an item is deleted in your SharePoint list, find the specific event within your Outlook calendar based on the Event ID column value and then delete the event from your Outlook calendar.

 

I have created a SharePoint list on my side and the data structure of it as below:8.JPG

Note: The Event ID column is a Single line of text type column, which is used to store the event id of the new created Outlook event. The default value of this column is empty. The ManuallyModify column is a Yes/No type column (Default value of it is No), which is used to check if the user modify this item. When the user modify this item. set the ManuallyModify column to Yes manually.

 

  • When a new item is created (or modified) in your SharePoint list, create an new event (or modify an existing event) in your Outlook
  1. Add a "When an item is created or modified" trigger, specify Site Address and List Name.
  2. Add a Condition, click "Edit in advanced mode", type the following formula:

 

@empty(triggerBody()?['Event_x0020_ID'])

    3. Within "If/yes" branch of Condition, add a "Create event (V2)" action, specify Calendar Id. Then add a "Update item" action, specify SIte Address and List Name, Event ID field set to Id dynamic content of the "Create event (V2)" action.

    4. Within "If/no" branch of Condition, add a Condition 2, click "Edit in advanced mode", type the following formula:

 

@equals(triggerBody()?['ManuallyModify'], true)

Within "If/yes" branch of Condition 2, add a "Get events (V2)" action, specify Calendar Id. Add a "Filter array" action, From set to output of the "Get events (V2)" action, click "Edit in advanced mode", type the following formula:

 

 

@equals(item()?['Id'], triggerBody()?['Event_x0020_ID'])

The add a "Apply to each" action, input parameter set to output of the "Filter array" action. Within "Apply to each" action, add a "Update event (V2)" action, specify Calendar Id, Id field set to Id dynamic content of the "Filter array" action. Under "Apply to each" action, add a "Update item 2" action, specify Site Address and List Name. the ManuallyModify field set to No.

 

 

Image reference:9.JPG

 

10.JPG

 

11.JPG

The flow works successfully as below:12.JPG

 

 

 

  • If you want to remove corresponding event from your Outlook calendar when an item is deleted from your SharePoint list, I afraid that there is no way to achieve your needs in Microsoft Flow currently.

 

 

Best regards,

Kris

 

 

 

 

 

 

 

 

 

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.

View solution in original post

Highlighted
Anonymous
Not applicable

Re: How to delete calendar event using microsoft flow

Did you found any Solutions for your problem? I also found no way to Delete an Calendar Event using microsoft flow...

Highlighted
Regular Visitor

Re: How to delete calendar event using microsoft flow

Is this product's bug or misconfiguration?  please advise, thanks

Helpful resources

Announcements
firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

Top Solution Authors
Top Kudoed Authors
Users online (6,602)