---
schema_version: "1"
id: 35fa87f921d466446befff9a7e0e7bf2f1c0ff7a2040c214ce66d8bd7dc97e95
title: Create Flows for Appointment Emails with Calendar Invites in Intelligent Appointment Management
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/appointment_self_service_email_flow.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.appointment_self_service_email_flow.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 53f997deca8af5e73d9b06103ab5e7569b5bb95cde1f156dc21ad740e8b347e9
description: 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.
products:
  - Health
release: "264"
---
# 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

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition">
        <colgroup>
          <col>
        </colgroup>
        <tbody>
          <tr class="">
            <td class="slds-cell-wrap" style="vertical-align:top;">
              <p>Available in: Lightning Experience</p>
              <p style="margin-bottom:0;">Available in: <strong>Enterprise</strong> and <strong>Unlimited</strong> Editions with Health
                Cloud</p>
            </td>

          </tr>
        </tbody>
      </table> <table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d19057e69">User
              Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d19057e69 ">To open, edit, or create a flow in Flow Builder:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d19057e69 ">Manage Flow</td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d19057e69 ">To create or change public email template folders:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d19057e69 ">Manage Public Classic Email Templates</td>

          </tr>
        </tbody>
      </table>

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.

1. 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](https://help.salesforce.com/s/articleView?id=ind.appointment_self_service_email_confirm.htm&release=264.0.0&type=5 "Provide consistent messaging when notifying patients about appointment confirmations. Use merge fields to include patient and appointment data.") and [Create an Email Template for Appointment Cancellations](https://help.salesforce.com/s/articleView?id=ind.appointment_self_service_email_cancel.htm&release=264.0.0&type=5 "Use a template for consistent messaging when notifying patients about appointment cancellations. Use merge fields to include patient and appointment data.").
2. Determine the IDs of your email templates for appointment confirmations and cancellations.
    1. From Setup, in the Quick Find box, enter Classic Email Templates, and then select **Classic Email Templates**.
    2. Click the name of the template.
    3. 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.
        
        ![Email template ID highlighted in the address bar](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-health-264-0-0-production-enus/90a9f828-79ab-49cd-ac8c-86e58ef7478e/health/images/hc_admin_classic_email_template_url.png)
3. If a No-Reply email isn’t set up for your org, create one.
    1. From Setup, in the Quick Find box, enter Organization-Wide Addresses, and then select **Organization-Wide Addresses**.
    2. Under Default No-Reply Address, click **Add** in the Organization-Wide Email Addresses for User Selection and Default No-Reply Use section.
    3. Enter a display name. The display name is what a customer sees as the email’s Sender Name.
    4. Enter your No-Reply email address.
    5. Select **Default No-Reply Address** as the purpose.
    6. Save your work.
        
        ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-health-264-0-0-production-enus/90a9f828-79ab-49cd-ac8c-86e58ef7478e/images/icon_note.png)
        
        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.
4. Create a record-triggered flow for appointment confirmations.
    1. From Setup, in the Quick Find box, enter Flows, and then select **Flows**.
    2. Click **New Flow**.
    3. Click **Start from Scratch**, and then click **Next**.
    4. Select **Record-Triggered Flow**, then click **Create**.
    5. For Object, select **Service Appointment**.
        
        ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-health-264-0-0-production-enus/90a9f828-79ab-49cd-ac8c-86e58ef7478e/images/icon_note.png)
        
        Note The API Name is ServiceAppointment; the label is Appointment.
    6. Set the flow to trigger when a record is updated.
    7. For the entry conditions, select **All Conditions Are Met (AND)**.
    8. Enter these conditions:
        
        <table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small "><colgroup><col> <col> <col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;"><strong>Field</strong></td><td class="slds-cell-wrap" style="vertical-align:top;"><strong>Operator</strong></td><td class="slds-cell-wrap" style="vertical-align:top;"><strong>Value</strong></td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">SchedStartTime</td><td class="slds-cell-wrap" style="vertical-align:top;">Is Null</td><td class="slds-cell-wrap" style="vertical-align:top;">$GlobalConstant.False</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">ContactId</td><td class="slds-cell-wrap" style="vertical-align:top;">Is Null</td><td class="slds-cell-wrap" style="vertical-align:top;">$GlobalConstant.False</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">StatusCategory</td><td class="slds-cell-wrap" style="vertical-align:top;">Equals</td><td class="slds-cell-wrap" style="vertical-align:top;">Scheduled</td></tr></tbody></table>
    9. For When to Run the Flow for Updated Records, select **Every time a record is updated and meets the condition requirements**.
    10. Optimize the flow for **Actions and Related Records**.
    11. Select **Include a Run Asynchronously path to access an external system after the original transaction for the triggering record is successfully committed**.
5. **Save** the flow.
6. Enter a Flow Label.
7. **Save** the flow again.
8. Add an assignment element to the flow to set the recipients of the email.
    1. Add an element by clicking ![Plus sign icon in Flow Builder](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-health-264-0-0-production-enus/90a9f828-79ab-49cd-ac8c-86e58ef7478e/health/images/flow_autolayout_addnode_icon.png).
    2. Click **Assignment**.
    3. Add a Label. We suggest Add Recipients.
    4. Keep the default API Name.
    5. For Set Variable Values, click the Variable input text box and select **New Resource**.
    6. For Resource Type, select **Variable**.
    7. For API Name, enter Recipients.
    8. For Data Type, select **Text**.
    9. Select **Allow multiple values (collection)**.
    10. Click **Done**.
    11. For Operator, select **Add**.
    12. For Value, select **{!Record.Account.PersonContactID}**, and that shows as **($Record > Account ID > Contact ID)**.
9. Add an assignment element to the flow for related records.
    1. Add an element by clicking ![Plus sign icon in Flow Builder](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-health-264-0-0-production-enus/90a9f828-79ab-49cd-ac8c-86e58ef7478e/health/images/flow_autolayout_addnode_icon.png).
    2. Click **Assignment**.
    3. Add a label. We suggest Add Related Records.
    4. Keep the default API Name.
    5. For Set Variable Values, click the Variable input text box, and select **New Resource**.
    6. For Resource Type, select **Variable**.
    7. For API Name, enter Related Records.
    8. For Data Type, select **Text**.
    9. Select **Allow multiple values (collection)**.
    10. Click **Done**.
    11. For Operator, select **Add**.
    12. For Value, select **{!Record.ID}**, and that shows as **($Record > Service Appointment ID)**.
10. Add an action to the flow to send the email.
    1. Add an element by clicking ![Plus sign icon in Flow Builder](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-health-264-0-0-production-enus/90a9f828-79ab-49cd-ac8c-86e58ef7478e/health/images/flow_autolayout_addnode_icon.png).
    2. Select **Action**.
    3. In the Action Search box, enter Send Message, and then select **Send Channel Message**.
    4. Add a label. We suggest Send Message.
    5. Keep the default API Name.
    6. For Engagement Channel, enter Email.
    7. For Template ID, enter the 15-digit ID you noted from the URL of your email template for appointment confirmations.
    8. For Message Type Handler, enter Appointment Confirmation.
    9. For Recipient IDs, select the **Recipients** collection variable that you created.
    10. For Related Record IDs, click **Include**.
    11. For Related Record IDs, select the **Related Records** collection variable that you created.
        
        ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-health-264-0-0-production-enus/90a9f828-79ab-49cd-ac8c-86e58ef7478e/images/icon_note.png)
        
        Note We suggest that you handle basic failures by creating a fault path in your flow. The Send Channel Message action has two output parameters that you can check. It has a success parameter and also outputs a list of failedRecipients.
11. Save your changes.
12. **Activate** the flow.
13. Repeat these steps to create and activate a flow for appointment cancellations. For this flow:
    1. Use the ID of your email template for appointment cancellations.
    2. For the entry conditions, select **All Conditions Are Met (AND)**.
    3. Enter these conditions:
        
        <table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small "><colgroup><col> <col> <col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;"><strong>Field</strong></td><td class="slds-cell-wrap" style="vertical-align:top;"><strong>Operator</strong></td><td class="slds-cell-wrap" style="vertical-align:top;"><strong>Value</strong></td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">SchedStartTime</td><td class="slds-cell-wrap" style="vertical-align:top;">Is Null</td><td class="slds-cell-wrap" style="vertical-align:top;">$GlobalConstant.False</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">ContactId</td><td class="slds-cell-wrap" style="vertical-align:top;">Is Null</td><td class="slds-cell-wrap" style="vertical-align:top;">$GlobalConstant.False</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">StatusCategory</td><td class="slds-cell-wrap" style="vertical-align:top;">Equals</td><td class="slds-cell-wrap" style="vertical-align:top;">Canceled</td></tr></tbody></table>
    4. For Message Type Handler, enter **Appointment Confirmation**. This is the correct value even though the flow is for appointment cancellations.
14. 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.
15. Enable email tracking. See [Enable Email Tracking for All Customers Opening Email from Your Company](https://help.salesforce.com/s/articleView?id=sales.email_enable_email_tracking.htm&type=5&language=en_US).

Now your patients get an automated email alerting them when their appointment has been booked or canceled.

#### See Also

- [Create an Email Template for Appointment Confirmations](https://help.salesforce.com/s/articleView?id=ind.appointment_self_service_email_confirm.htm&release=264.0.0&type=5 "Provide consistent messaging when notifying patients about appointment confirmations. Use merge fields to include patient and appointment data.")
- [Create an Email Template for Appointment Cancellations](https://help.salesforce.com/s/articleView?id=ind.appointment_self_service_email_cancel.htm&release=264.0.0&type=5 "Use a template for consistent messaging when notifying patients about appointment cancellations. Use merge fields to include patient and appointment data.")
- [Organization-Wide Email Addresses](https://help.salesforce.com/s/articleView?id=sales.orgwide_email.htm&type=5&language=en_US)
- [Email Templates in Salesforce Classic](https://help.salesforce.com/s/articleView?id=sales.admin_emailtemplates.htm&type=5&language=en_US)
- [Build a Flow](https://help.salesforce.com/s/articleView?id=platform.flow_build.htm&type=5&language=en_US)