Custom Confirmation and Cancelation Emails
Nylas Scheduler allows you to disable the automatic emails sent to all parties when bookings are confirmed and canceled using the
confirmation_emails_to_guests booking configuration option. See the Whitelabeling Guide for more details on how to disable these automatic email notifications.
This guide walks through how you can build your own custom email workflows on top of Scheduler if you've disabled the default email notifications.
You can disable automatic emails as part of the booking flow. Email confirmations are automatically sent to the guest and the host. Scheduler gives you the option to disable either of these emails.
There are two ways to disable automatic emails.
- Using the Scheduler configuration
- Using the API
Use the configuration options:
These default to true.
// Account access_token with active calendar scope
// Style the schedule editor
title: "30-min Coffee Meeting",
When you create scheduling pages using the API, you can disable automatic emails.
Use the configuration options:
Configure your scheduling pages with the
config.appearance.thank_you_redirect set to a URL on your web application. When a booking is created, rescheduled, or canceled the visitor will be sent from the booking flow to this URL, with the following query string parameters:
||unix timestamp||Start time of the event|
||unix timestamp||End time of the event|
||string||IANA time zone database formatted string (e.g. America/New_York).|
||string||Page slug where the booking took place|
||string||The name provided when booking the event|
|string||The email provided when booking the event|
||string||Location description of the event|
||string||Unique edit hash that can be used to modify this booking|
||string||Nylas Event id created for this booking|
||object||key-value pairs for additional fields on the booking form|
|*custom query parameters||string||any additional query parameters when visiting the scheduling page|
You can use this information to build and send your own booking confirmation email. The reschedule and cancel booking links are formatted in this way, where
domain is your custom domain (launching later this year) or schedule.nylas.com:
In addition to sending your own configuration email using this data, your service should save the Nylas Event ID (
event_id) associated with the booking.
Configure your application via the Nylas dashboard to receive
event.deleted webhook events. When you receive an event change, perform the following steps:
- Does the modified
event_idmatch a booking? If not, ignore it.
- Retrieve the latest copy of the event object via the Nylas GET /events/:id API.
- If the event
cancelledor if every
no, send a cancelation email for the booking.
It's important to check for cancellations via the Nylas API, because bookings can be canceled using the booking page and the booking's cancelation URL, but they can also be canceled by participants removing the events from their calendars. In that case, the scheduler is never shown and we cannot deliver a notification via the thank_you_redirect.