Nylas allows you to set up advanced booking capabilities for users on your platform. This is a good fit for expert marketplaces. Users can set up their own availability and calendar syncing.
Run mode without redirect: https://chris-sandbox.bubbleapps.io/version-test/nylas?state=test&namespace_id=3z6ypewhajtuzw1fqmuli4m7u&account_id=3z6ypewhajtuzw1fqmuli4m7u&sid=31&access_token=9KRERoMdeMABdnU7AjJ3lKEOUeFuyG&provider=gmail&email_address=chris%40airdev.co
Username: username Password: password
In order to set up, the following things are needed:
Be sure to set the Callback ID
Google OAuth Setup (if allowing google accounts to use Nylas)
AirDev Nylas plugin (private plugin as of July 2020, talk to Chris or email [email protected] for this)
This call signs a user in with their account (Gmail, Microsoft account, Yahoo, etc). Be sure to save the access_token after a user is redirected back to the page.
Redirect URI: page a user is redirected back to
State: Text that will be passed along with the redirect in the URL
Email: The email for the user that is signing up
This doesn't automatically create a Bubble user, since it's not an OAuth call through the Bubble OAuth flow. A workaround for this is this:
These API calls can be used to manage events in a user's calendar.
Fairly straightforward. They use UNIX timestamps without milliseconds for times, so be sure to pass those correctly. UNIX timestamps do not have time zones so there is no need to worry about time zone confusion once the data is passed to Nylas.
Inputs include a Calendar ID, gotten by the "Get Calendars" data API endpoint, and an access token, returned when a user first authorizes.
NOTE: for future projects, if more inputs are needed, reach out to [email protected] (e.g. if a custom message needs sent when notifying participants, if participants need to be able to be added to events, if "all-day" events need created, etc).
The Get Calendar call may need to be used in the user onboarding process to prompt a user which calendar(s) to check for overlapping events. In the calendars returned here, a user's colleagues' calendars may appear here as well, for example, or they could have other calendars that they don't want to consider.
This flow could also be used to have a user confirm which Calendar they want us to create new events in.
To know if a user is available at a certain time, their calendar can be checked for times that they are available, checked for times that they are busy, or all events can be returned from their calendar(s).
If more specific calls are needed for the Get Events call, email [email protected] or ask Chris to add those fields.