Hello community,
I'm currently racking my brains over my flow and would be very happy if someone could help me here.
What should the flow do?
I have two different Outlook calendars and I want to sync changes from one calendar ("Orange") to the other ("Blue").
I currently use a flow that is triggered when an event is created, updated or deleted.
Recurring Events after syncing
How is this implemented?
For each created event, the ID of the event from calendar "Orange" together with the ID of the resulting event from calendar "Blue" is saved in a SharePoint list. Updates and deletions can then filter this list and compare their trigger ID with the corresponding ID of the event from calendar "Blue" in order to find and update / delete the correct event in it.
Sharepoint list name is PowerAutomate Calendar Sync with Columns OrangeEventId and BlueEventID.
What is the problem right now?
The problem is currently recurring events and occurrences. It seems that Power Automate has massive problems with handling these. [in the last time I had also problems with identifying the "Action Type" ... sometimes PA gives out a "deletion" for an "update"].
Especially the Start and End date seems not to be exact.
Example A:
Updating an occurrence
Given: Recurring event
Action: Update just one single occurence
Update Occurence
Update Occurence finished
Example B:
Deleting an occurrence
Given: Recurring event
Action: Delete just one single occurence
Delete Occurence
Maybe someone has an Idea how to get the Flow working properly?
Create Flow:
Every time a new (recurring) Event is created in the orange Calender there is a copy (as single occurence) created in the blue Calender. This is the reason for using "Get calendar view of events" task because it will handover the single occurences.
My hope was to be able to identify an occurence if there is for example just an ID given while deleting a single occurence.
As the trigger Body does only contain the master series date, I tried to set as End date 30 days in future with "addDays" function. Let me know if you have a more intelligent/elegant idea to work around.
- When a new event is created (V3)
Calender id : OrangeKalender - Get calendar view of events (V3)
Calender id : OrangeKalender
Start Time : triggerBody()?['start']
End Time : addDays(triggerBody()?['end'],30)
Apply to each
- Create Event (V4)
Calender id : BlueCalendar
Subject : items('Apply_to_each')?['subject']
Start Time : items('Apply_to_each')?['start']
End Time : items('Apply_to_each')?['end']
Time zone : items('Apply_to_each')?['timeZone'] - Create item -> this will create a Sharepoint List item where I'm storing for every Calendar ID the corresponding other Calendar ID so that they are referenced to each other
OrangeEventId : items('Apply_to_each')?['id']
BlueEventId : body('Create_event_(V4)')?['id']
Update Flow:
- When an event is updated (V3)
Calender id : OrangeKalender - Get items
Filter Query : OrangeEventId eq 'triggerBody()?['id']'
Apply to each
- Update event (V4)
Calender id : BlueCalendar
Subject : items('Apply_to_each')?['subject']
Start Time : items('Apply_to_each')?['start']
End Time : items('Apply_to_each')?['end']
Time zone : items('Apply_to_each')?['timeZone']
Delete Flow:
- When an event is deleted (V3)
Calender id : OrangeKalender - Get items
Filter Query : OrangeEventId eq 'triggerBody()?['id']'
Apply to each
- Delete event (V4)
Calender id : BlueCalendar
Id : items('Apply_to_each')?['BlueEventId']
Any ideas or feedback is very welcome!
Would be fantastic, if someone can help me at this stage.
Kind regards,
Tobias