I am trying to setup a 2way sync between google calendar and office 365 calendar.
i am trying to insert a condition that checks if there is already an event that occurs at that time.
has someone else been able to get this to work?
Solved! Go to Solution.
Hi @jarge,
In addition to avoid the time range conflicts, we would alos need to consider the sync cycling.
If here you would like to filter if there is a same event created in Google calendar, then the office calendar should have a field to check with the Event Id generated from the Google Calendar.
To avoid the Sync cycling, we would need to configure the following two Flow:
Flow1
Flow 2:
When an event is created under either calendar, it will trigger both flow to run, and depends on whether events exists at the other calendar, flow will do nothing or create a new Event.
To filter the Event time range conflicts, we could add another filter array action after the existing one. (Or you may combine it with the filter Array in the flow example above)
And change the condition after the Filter Array with an and:
@and(empty(body('Filter_array')),empty(body('Filter_array_2'))
formula in Flow One (Google Calendar as the trigger) of the second Filter Array should be:
@or( And(LessOrEquals(triggerBody()?['start'],item()?['Start']), Less(item()?['Start'],triggerBody()?['end']) ), And(less(triggerBody()?['start'],item()?['End']), LessOrEquals(item()?['End'],triggerBody()?['end']) ) )
For Office 365 as the trigger, it should be:
@or( And(LessOrEquals(triggerBody()?['Start'],item()?['start']), Less(item()?['start'],triggerBody()?['End']) ), And(less(triggerBody()?['Start'],item()?['end']), LessOrEquals(item()?['end'],triggerBody()?['End']) ) )
Regards,
Michael
Hi @jarge,
In addition to avoid the time range conflicts, we would alos need to consider the sync cycling.
If here you would like to filter if there is a same event created in Google calendar, then the office calendar should have a field to check with the Event Id generated from the Google Calendar.
To avoid the Sync cycling, we would need to configure the following two Flow:
Flow1
Flow 2:
When an event is created under either calendar, it will trigger both flow to run, and depends on whether events exists at the other calendar, flow will do nothing or create a new Event.
To filter the Event time range conflicts, we could add another filter array action after the existing one. (Or you may combine it with the filter Array in the flow example above)
And change the condition after the Filter Array with an and:
@and(empty(body('Filter_array')),empty(body('Filter_array_2'))
formula in Flow One (Google Calendar as the trigger) of the second Filter Array should be:
@or( And(LessOrEquals(triggerBody()?['start'],item()?['Start']), Less(item()?['Start'],triggerBody()?['end']) ), And(less(triggerBody()?['start'],item()?['End']), LessOrEquals(item()?['End'],triggerBody()?['end']) ) )
For Office 365 as the trigger, it should be:
@or( And(LessOrEquals(triggerBody()?['Start'],item()?['start']), Less(item()?['start'],triggerBody()?['End']) ), And(less(triggerBody()?['Start'],item()?['end']), LessOrEquals(item()?['end'],triggerBody()?['End']) ) )
Regards,
Michael
can a third flow be added to modify events in either o365 or google if the event time is changed?
How could this be implemented on two calendars in o365?
i cant seem to get the ID to be checked from one Calendar in o365, to another..
just keeps looping.
Thanks!
How to make it work this way, when events are modified and/or deleted?
Having some issues with this. Has anyone used the when Events are added,modified, or deleted trigger for this. Trying to habdle all the cases for proper two way sync.
Unfortunalty I am not sure what is going on but doesnt seem to be working.