O365 | Flow - Sync an Outlook calendar to Google Calendar

Micke Kring Micke Kring · · 3 min read
Läs på svenska
O365 | Flow - Sync an Outlook calendar to Google Calendar

In this second Microsoft Flow tip there’s one (read: three) flow(s) that sync any Outlook calendar with a Google Calendar. In my case it’s the school’s calendar, which I need to get out in order to process the data in it. Because it’s not possible to create exportable .ics files from O365 (locked within the organization) I use Google Calendar for that.

I won’t explain too much in this post, but rather show images of what the flow looks like. If you want a bit more background on how to use Flow you can look at my previous post about Sharepoint and email. These flows are a bit work-in-progress and could probably be made into one flow. For now I have them separated to make debugging easier and because they’re kind of Google-hacked solutions.

Flow 1 - Copies and creates an event in Google Calendar from Outlook

This Flow is triggered when a new event is created in our Outlook calendar that should be copied. The condition ‘Condition’ you see is probably not needed, but it’s a preparation for two-way sync, i.e. from Outlook to Google and vice versa. The event’s (event) Text is stripped of its HTML and then we create an event (event) in Google Calendar. In the Description of the event there’s some code. The important thing here is to include the ID. In the other flows we’ll search for and modify those events and will need an ID to look for.

Flow 2 - Updates an event in Google Calendar when the event in Outlook is updated

In the second flow we want it to trigger when an event is updated or changed. We of course select the same Outlook calendar. After that we want to list all events in our Google Calendar and search using the ID from Outlook to see if anything matches. If the ID matches we will modify all (apply to each) and update all matching events in the Google Calendar.

Flow 3 - Deletes an event in Google Calendar when the event in Outlook is deleted

The final flow is triggered when an event in Outlook is deleted. In the condition we check if the event’s Action Type equals deleted. If it is, we list all events in our Google Calendar and search with the ID. Then we delete all events that match.

Test and run

So this is what my flow (or the three) looks like and it works like a charm. Keep in mind that your flows don’t run instantly; depending on your subscription they might run every 10 minutes or so. So you create an event — wait and see — and test again.

Good luck and get in touch if you have any questions! Either here in the comments or via any social media.