cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RaghavaReddy
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
v-xida-msft
Community Support
Community Support

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
8BitWarrior
Advocate III
Advocate III

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

v-xida-msft
Community Support
Community Support

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

Anonymous
Not applicable

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

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

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

Users online (80,771)