You are here:
Create a Flow for Appointment Emails with Calendar Invites in Virtual Care
Create a custom record-triggered flow to call an invocable action that adds a calendar file (.ics) to an appointment email. The attendance rate for Virtual Care appointments improves when a calendar invite is included in the appointment email.
Required Editions
Available in: Lightning Experience Available in: Enterprise and Unlimited Editions with Health Cloud |
| User Permissions Needed | |
|---|---|
| To administer Video Calls: | Health Cloud Video Calls permission set |
| To create, edit, and delete flows: | Manage Flows general user permission in the user's profile |
| To add an organization-wide address: | Modify All Data administrative permission in the user's profile |
-
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.
-
Identify an email template ID to use with this flow.
Note The email template can be a Classic Email Template or Lightning Email Template. If you don’t have an existing template, follow these steps to create one: Email Template in Lightning Experience.- 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.
-
Create a record-triggered flow.
- 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 the 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 Any Condition is Met (OR).
-
Enter these conditions:
Field Operator Value SchedStartTime Is Changed True SchedEndTime Is Changed True StatusCategory Is Changed True - For When to Run the Flow for Updated Records, select Every time a record is updated and meets the condition requirements.
- Set the flow to be optimized 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 RelatedRecords.
- 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 Message Type Handler, enter Video Call Confirmation.
- For Recipient IDs, select the Recipients collection variable that you created.
- For Template ID, enter the 15-digit email template ID you noted from the url of the email template record.
- 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.
- Activatethe flow.
Did this article solve your issue?
Let us know so we can improve!

