I have been working on a flow to copy events from the calendar of my organization's president into a SharePoint list and I have gotten most of it to work. I am including the ID of the event and using "Get Items" from SharePoint to deal with deletions and updates. When I add/change/delete a single item everything works perfectly.
The problem comes when dealing with recurring items. It looks like that when I delete a single item in a recurring event that Office 365 removes the entire series and creates all of the remaining entries again. This causes duplicate entries of all of the remaining occurences. It doesn't seem to ever trigger the deletion step in a flow so nothing gets removed.
Any ideas how to deal with recurring items when working in a flow?
Could you please share a screenshot of your flow's configuration?
I have made a test on my side and don't have the issue that you mentioned. My flow's configuration as below:
Within "If/yes" branch of Condition 2, add a "Apply to each" action, input parameter set to output of "Filter array" action. Within "Apply to each" action, add a "Update item" action, Id field set to following formula:
Within "If/no" branch of Condition 2, add a "Apply to each 2", input parameter set to output of "Filter array" action. Within "Apply to each" action, add a "Delete item" action, Id field set to following formula:
Note: When I add a Recurrence event in my Outlook calendar, the flow would not create a recurrence event in my SharePoint calendar. It would create several separated events in my SharePoint calendar.
The flow works successfully as below:
First @v-xida-msft thank you for taking time out to help.
I can't figure out how to attach screenshots to a post (sorry) but I will describe what I have done. I am also wondering if I made this in an inefficient manner as I am just starting to learn some of the things I can do with Flow. In fact, looking at your flow I may have already found some things to change but I am going to post my current set up.
I set up a SharePoint list with Title, Start Time, End Time, Category, and Event ID. Category will be changed by the user in SharePoint later until MS updates the "When an event is added..." connector is updated to include category. Event ID will be set to the ID of the calendar even
As I said in the initial post this all works fine for a single item. For a new recurring item it works also. The problem is when trying to delete or update a single instance of a recurring item. Then it just adds an additional entry for all of the remaing occurences.
If I can figure out how to post screenshots I will do so. In the meantime I am trying to use the code from @v-xida-msft to see if I can work this out.
So I have been trying to do some more poking around. I created a new flow which simply fires off when a new event is added, updated or deleted. It then sends me an e-mail with the "Action Type" in the body.
What I have discovered is that when I delete single item of a recurrence none of the e-mails come back with an action type of "deleted" rather I will get a bunch of "added" e-mails.
This means that deleting a an instance of recurring item removes the entire recurrence and rebuilds it with the remaining items. Since these all fire off individual instances of the flow I don't see any way to deal with this,
Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.
Look out for new contribution recognition badges coming SOON!
We've updated and improved the layout and uploading format of the Power Automate Cookbook!
Fill out a quick form to claim your user group badge now!
The top training and networking event across the globe for Microsoft Business Applications