cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MaxR
Level: Power Up

Two way O365 Calendar sync

I am new to Flow and have just started tinkering with some flows.  There's a fairly basic O365 <-> O365 calendar sync widget that would be really useful for me, and I suspect would be for others.  I was able to find some some snippets of what I need here in the forums but several of the examples use older API versions that are significantly different than more recent ones.  Also, I need to be careful that my "newbi-ness" doesn't get me into trouble with an accidental sync loop storm that placess a million meetings on my calendars.

 

User Story:  I am a consultant that often works with two customers, who each will often double-book me or we need to go through scheduling message exchnages.  (Love Microsoft's FindTime add-in, BTW, it's a game-changer.)  The problem is that invites on account Foo may contain confidential information that is not appropriate to sync to account Bar, and vice-versa.  So Ideally, meetings on Foo sync to Bar as simply "not available" with no attachments, content, invitees, etc.  I call this the "obfuscation feature."

 

There are some examples that do one-way calendar syncs with the newer add-update-delete event model.  But they lack sync loop protection, do not incorporate obfuscation, and in some cases are a few years old and are based on older APIs.  The closest one has an intermediate process that includes sharepoint, that just adds complexity to my limited understanding.

 

I started out with a "when an event is added, updated or deleted trigger" leading to a switch (case statement for us older folks).  It appears now I don't have to get events any longer, I can go right into a create, update, or delete action.  So my mental pseudocode so far is:

 

New Event in Foo => create new event in Bar;

  1. See if event subject equals "Time blocked in Bar" - if so, this is a re-sync, bailout to prevent loop
  2. Set event start and stop times on new event from original event.  (Not sure how time zones would be handled but luckily Foo and Bar are in same zone...  But what about travel?)
  3. Set subject to "Time blocked in Foo" (which will be tested to prevent sync loop)
  4. Maybe set a category to color code it as a reminder it's from the other calndar
  5. Deal with recurrence.  (Oy, this is getting complicated for a newbie!)
  6. End

Similar intuition for update and delete.  Same code in both directions flipping Foo with Bar.

 

More puzzlement:

  1. So, do I need to deal with event IDs, as some samples have?
  2. Handling recurrence is a little unsettling.  (I need to report what looks like a bug in the Create event (v2) action too)

 

Any help would be appreciated, Thanks!

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (4,821)