Forum Discussion
Sync multiple calendars in one
- Jan 30, 2017
Maybe MS Flow can help. Check https://flow.microsoft.com/en-us/templates/?category=eventsAndCalendar&sort=properties%2Fstatistics%2Finstantiations.
It is hard to sync calendars in both ways, and in outlook there is no trigger 'When event is deleted', but all new meetings you can send automatically to one calendar.
IT MEC Group Sorry, I've been fielding this type of thing in several different Forums.
There are a few questions to ask yourself.
How much time can I spend on this?
How much work do I want to do?
What kind of communication do you want (one way to copy from one to the other, two way with control of add edit delete at both ends)?
The typical Microsoft provided way is to do a commanding, one directional, complete rewrite of an entire calendar from one service to the other.
However, the professional solution for two way, clean transfer is using an intermediary database and server to handle the parsing of data in different formats so that it can be written back and forth.
First, it's best to default your Exchange calendars to use plain text in the body of the event. If there is HTML, you could end up with a problem later. Special notices can be added as attachments in a native document format. Make sure this is known to all involved, or, you can try to handle the HTML on your own.
Microsoft does provide a way to do this in Power automate. However, if you want to have 2 way communication between multiple calendars, you will need at least 3 FLOW apps for each calendar. With one way communication, you need to have 3 Flow operations for each calendar that has any control over the others.
You will also need to create a set of sharepoint lists. First, a Main Events ID's list which will grab the calendar ID and event ID for every calendar's events. 2 values for each calendar because the Calendar has a unique ID and the events have a unique ID. Events that get copied will have a set of ID's in each calendar. The next set of information is the TIME ZONE, one for each calendar, unless they all return the same time zone format in UTC format. In this instance, even calendars in different time zones will be aligned properly.
There are several things to remember:
Never copy recipient info. You can have it added as an attachment in an excel or similar file type if you think you'll need it. When you want to add recipients from the calendar that did not create it, you should be able to add them to a list that fits each sending calendar. Another way to do this is to add a file ID in your main list. You will need one for each adress, and each list should give you the recipient address with the type (google has only one type).
This way, you can keep those lists and pull them based on the file id. This is called an ID matrix message server. When the Flows trigger, they test how they got triggered. In every Set of flows, you can check against the "ISUPDATED" value in the Exchange event to decide if the event was begun here or in another calendar. IF you then update the Exchange event, then wait for a minute or two before updating the next calendar, this value will help with checking again in that flow, which will stop the flows from permanently Looping. However, you will have to make your own testing for the Exchange calendar Flow. The way to do this is to GET CHANGED EVENTS in google Calendars. Using the current event's ID in exchange, you get the row, then compare each id in the changed google event lists, with that ID (don't forget to check if they are empty lists). IF they are empty lists, no event's have been changed since last run, they need to be updated. If there's a changed event in either other calendar whose ID aligns in the sharepoint list, you can bet that calendar's flow is updating the other calendars. This is the preferred way for update tests.
In the update flows, you can set up a test for the recipients having changed or if particular recipients are included. This is especially important with resource recipients. In exchange, they can be booked for as many as a resource mailbox has listed (how many in stock). For buildings and rooms, you instead get only one. In Google, they are all the same, with a single type and you need a special automator applet to have them automated. If you have these in both google and in Exchange, you can enter them from either side, but it would be better to add resources from each to their own recipient list and keep track of this with an excel file per calendar per event, and the file should get a timestamp with G or EX or the like for a name. If you have multiple accounts in either service, use the EventID, and CalendarID that you can search for later. Now you don't have to copy recipient lists or leave them out.
Another way to deal with this is to simply update by pulling the recipient list from how it is currently while other parts are simply copied from other sections of other calendars.
For the BODY, you'll need to turn HTML from exchange to Text for the others, but you can add an attachment to them for the HTML that can be opened later. When they update Exchange, you simply switch to text and copy it right over, dumping the HTML file.
For all creation and deletion, never copy over the recipients.
For deletion, you will first need to test if the event still exists in the other calendars. The fastest way is to test if the row still exists in the main sharepoint list.
If so, copy the blank list template, this will make a temporary file. Copy the Row from the main list piece by piece to the temp list, then delete the row from the main list. Now delete the other events from other calendars by matching in the temporary list. When you're done, delete the recipient list files, and the temporary list file.
On Creation, Each calendar gets a file with recipients which is what will be used to fill the recipient lists and check them.
This continues to be a major issues with not a lot of good solutions. I tried CodeTwo but ended up with bunch of duplicate entries and each sync cycle made the calendar worse. I tried to register for a relatively expensive ConnectingSoftware but was not able to configure it right. They have a lot of cool videos that make the program look really cool but I just couldn't get it to work. And besides these two I tried a lot more products but they were either too expensive (esp with monthly fees) or didn't work at all.
For me eventually the fastest and probably the easiest way was to use a software called gsyncit although it requires creating an intermediate google account. I had used their free version for many years to sync my outlook calendar with my family google calendar and it worked great. Their free version creates a delay of 15 seconds before your outlook can start but that was not a big issues. However, the free version only allows you to work with 1 account (1 outlook and 1 google).
So finally I coughed up 20 bucks for a one time fee for one computer. No subscription is needed. It is an addin to your outlook and you can program it to work in background, at the start or close or you can manually start the sync process. (FYI: I am in no way affiliated with this company or have any financial benefit or interest).
I had to create multiple steps to sync my two outlook calendars but all the steps run automatically with one click once you are done configuring it.
Following are the steps I used. Some of the check boxes I adjusted in the Mapping and sync options are also listed.
Step 1:
OutlookCalendar1 And Google Calendar: Two way sync, Manually confirm edits, Manually restricted sync range to 30 days before and 30 days after in the beginning to avoid creating a mess. You also have the options to only sync accepted meetings or all meetings. Since I rarely respond to calendar requests I unchecked that box. Your situation might be different.
Step 2:
Google Calendar And Outlook 2: Two Way Sync. Same options
Step 3:
Google Calendar and Outlook1: 1 way sync from google to Outlook1. Although I got similar results with 2 way sync.
People looking to sync more than 2 outlook calendars will have to add a few more logical steps to make it work.
Once you click on the sync button all the steps run in sequence automatically with just 1 Click. This is a screenshot
Another great feature of this program is a function called remove duplicates. I ran it to clean up the mess created by Codetwo and it helped me remove thousands of duplicate entries within a couple of minutes painlessly.
Hope this helps.