You are here:
Create Flows for Appointment Emails with Calendar Invites in Intelligent Appointment Management
Create a record-triggered flow that automatically sends patients an email after their appointment is booked or canceled. Appointment confirmations include a calendar file (.ics). Enable email tracking to verify that appointment emails, which include personal health information about a patient, reach the intended recipient.
Required Editions
Available in: Lightning Experience Available in: Enterprise and Unlimited Editions with Health Cloud |
| User Permissions Needed | |
|---|---|
| To open, edit, or create a flow in Flow Builder: | Manage Flow |
| To create or change public email template folders: | Manage Public Classic Email Templates |
Appointments can originate from various records such as accounts, tasks, or clinical service requests. If you have a custom flow for managing appointments, include a Decision element that evaluates the parent ID of the appointment. For example, identify record IDs that start with 001 as accounts, and record IDs that start with 0jy as clinical service requests. Create separate flow paths based on the outcome of the decision. If the parent record is a clinical service request, create a separate path to get the IDs of the clinical service records and then assign those IDs to the Recipients variable.
- If you haven’t already done so, create an email template for appointment confirmations and an email template for appointment cancellations. See Create an Email Template for Appointment Confirmations and Create an Email Template for Appointment Cancellations.
-
Determine the IDs of your email templates for appointment confirmations and
cancellations.
- From Setup, in the Quick Find Box, enter Classic Email Templates, and then select Classic Email Templates.
- Click the name of the template.
-
In the URL address bar for your template, find the 15 character string
of numbers and capital letters that starts with 00X. Make note of this
ID so that you can add it to the flow.
-
If a No-Reply email isn’t set up for your org, create one.
- From Setup, in the Quick Find Box, enter Organization-Wide Addresses, and then select Organization-Wide Addresses.
- Under Default No-Reply Address, click Add in the Organization-Wide Email Addresses for User Selection and Default No-Reply Use section.
- Enter a display name. The display name is what a customer sees as the email’s Sender Name.
- Enter your No-Reply email address.
- Select Default No-Reply Address as the purpose.
-
Save your work.
Note An email is sent to the organization-wide email address. Follow the steps in the email to verify your org’s default No-Reply address.
-
Create
a record-triggered
flow
for appointment confirmations.
- From Setup, in the Quick Find box, enter Flows, and then select Flows.
- Click New Flow.
- Click Start from Scratch, and then click Next.
- Select Record-Triggered Flow, then click Create.
-
For Object, select Service Appointment.
Note The API Name is ServiceAppointment, the label is Appointment. - Set the flow to trigger when a record is updated.
- For the entry conditions, select All Conditions Are Met (AND).
-
Enter these conditions:
Field Operator Value SchedStartTime Is Null $GlobalConstant.False ContactId Is Null $GlobalConstant.False StatusCategory Equals Scheduled - For When to Run the Flow for Updated Records, select Every time a record is updated and meets the condition requirements.
- Optimize the flow for Actions and Related Records.
- Select Include a Run Asynchronously path to access an external system after the original transaction for the triggering record is successfully committed.
- Save the flow.
- Enter a Flow Label.
- Save the flow again.
-
Add an assignment element to the flow to set the recipients of the email.
-
Add an element by clicking
.
- Click Assignment.
- Add a Label. We suggest Add Recipients.
- Keep the default API Name.
- For Set Variable Values, click the Variable input text box and select New Resource.
- For Resource Type, select Variable.
- For API Name, enter Recipients.
- For Data Type, select Text.
- Select Allow multiple values (collection).
- Click Done.
- For Operator, select Add.
- For Value, select {!Record.Account.PersonContactID}, and that shows as ($Record > Account ID > Contact ID).
-
Add an element by clicking
-
Add an assignment element to the flow for related records.
-
Add an element by clicking
.
- Click Assignment.
- Add a label. We suggest Add Related Records.
- Keep the default API Name.
- For Set Variable Values, click the Variable input text box, and select New Resource.
- For Resource Type, select Variable.
- For API Name, enter Related Records.
- For Data Type, select Text.
- Select Allow multiple values (collection).
- Click Done.
- For Operator, select Add.
- For Value, select {!Record.ID}, and that shows as ($Record > Service Appointment ID).
-
Add an element by clicking
-
Add an action to the flow to send the email.
-
Add an element by clicking
.
- Select Action.
- In the Action Search box, enter Send Message, and then select Send Channel Message.
- Add a label. We suggest Send Message.
- Keep the default API Name.
- For Engagement Channel, enter Email.
- For Template ID, enter the 15-digit ID you noted from the URL of your email template for appointment confirmations.
- or Message Type Handler, enter Appointment Confirmation.
- For Recipient IDs, select the Recipients collection variable that you created.
- For Related Record IDs, click Include.
- For Related Record IDs, select the Related Records collection variable that you created.
-
Add an element by clicking
- Save your changes.
- Activate the flow.
-
Repeat these steps to create and activate a flow for appointment cancellations.
For this flow:
- Use the ID of your email template for appointment cancellations.
- For the entry conditions, select All Conditions Are Met (AND).
-
Enter these conditions:
Field Operator Value SchedStartTime Is Null $GlobalConstant.False ContactId Is Null $GlobalConstant.False StatusCategory Equals Canceled - For Message Type Handler, enter Appointment Confirmation. This is the correct value even though the flow is for appointment cancellations.
-
In Object Manager, verify that the Email field is on the Person Account page
layout. If necessary, add this field to the layout.
To ensure that appointments are booked successfully, make sure all patients have an email address associated with them.
- Enable email tracking. See Enable Email Tracking for All Customers Opening Email from Your Company.
Now your patients get an automated email alerting them when their appointment has been booked or canceled.

