Services Plugins FAQs

Calendar Time Slots Plugin

Based on the forum and my work, I’m unsure this is possible.

I want to build a calendly-like app where prospects can select times on the meeting host’s calendar. Previous bookings and those on the meeting host’s Google calendar are blocked out from the prospect’s point of view.

  1. From what I can tell, the Calendar Time Slots tool can only display the information of hosts that have signed up using the Google Authentication SSO. So, if someone registers via Bubble’s sign-up process, it will not be able to retrieve their Google Calendar, correct?

  2. Can I import and refresh a meeting host’s calendar indefinitely? Or is it only available when the user authorizes their calendar? i.e., future Google Calendar blocks won’t be able to appear in my bookings object as busy.

Thanks!
-Jason

Hey Jason,

I am currently trying to get about the same thing set up for our organization.

  1. Yes, they will have to authorize their own google calendar account to sync. You can accomplish this in their UI with a simple “Connect Google Calendar” button to enable the feature from their perspective. (Just part of the set up process similar to calendly). You will use the sign in with OAuth to google calendar though the plugin you choose. Of course, you will need to set up all the necessary keys and enable the API’s in your google developer account. This is really well documented by Zeroqode.

  2. They need to authorize the calls to their account first of course, but this is the part I am stuck on. Ideally after downloading all the currently created events you create a push webhook notification from google everytime that user makes a change or adds an event. This way you can update your database upon a change instead of constantly polling for new information.

I have been able to download all calendars and events this far and even create the push notification process but I am getting empty notifications for some reason from google everytime an event is changed. I would be happy to share my whole process with you if I can get this working end to end.

Hi Jason,

I have now completed my calendar sync module end to end blocking my user’s booking calendar with their own google calendar events! After running a primary sync using the list events command and obtaining a sync token: I’m using a calendar watch command for google apis webhook to notify my app whenever a user changes an event on their calendar. When I receive the notification I use the channel ID I set for the watch to look up the user’s calendar that had the change, and then poll google using the calendar id and sync token parameter associated with that calendar using the get-event list agin. This only gives me the updated event so I don’t need to spend a bunch of WU’s updating all the events. You can do this whenever you want using a refresh token to get access tokens on command after the user has logged in using oauth at least once. I just save the access tokens expiration date so before try to make any calls using the users access token I first check to make sure it is still active- if not get a new one then proceed with my calls.

I think there may be another way using the freebusy endpoint but I didn’t explore it due to the fundamental functions needed of my app to keep a copy of every user event. I also believe this call is not supported with the plugin yet but you can easily set it up manually (i can provide you some resources if you want).

Hope that all made sense!

Hey @jason7 ,
Thank you for using our products.

It looks like @jon8 has already answered all your questions, for which we are very grateful, it shows that the Bubble community is evolving and moving in the right direction.

If you have any more questions, I`m always happy to help.

Have a great weekend!

Best Regards,
Anton