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.
Username: username Password: password
In order to set up, the following things are needed:
- 1.Nylas Application
- 1.Be sure to set the Callback ID
- 3.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).
Returns times a user is available
Returns times a user is busy
Returns information about a calendar's events, with a lot of metadata (event name, description, etc)
If more specific calls are needed for the Get Events call, email [email protected] or ask Chris to add those fields.
To set up a webhook, it's necessary to respond to a GET call from some endpoint, which as of December 2021 is not possible using Bubble. (See Nylas' docs for more details on this GET call and the response.)
We've used Google Cloud Functions and Integromat as ways to set this up. The correct setup will vary based on your use case.