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;
- See if event subject equals "Time blocked in Bar" - if so, this is a re-sync, bailout to prevent loop
- 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?)
- Set subject to "Time blocked in Foo" (which will be tested to prevent sync loop)
- Maybe set a category to color code it as a reminder it's from the other calndar
- Deal with recurrence. (Oy, this is getting complicated for a newbie!)
- End
Similar intuition for update and delete. Same code in both directions flipping Foo with Bar.
More puzzlement:
- So, do I need to deal with event IDs, as some samples have?
- 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!