Salesforce Email Automation with Flow and Lightning Templates

Email Automation Blog Image

Why Automate Emails?

There are countless reasons for automating emails in Salesforce. For instance, it improves customer relationships by increasing touch points with your constituents throughout their customer journey while ensuring consistent timing and messaging.

Not only are there external benefits, but internal too. Consider how much time employees could save by leveraging Flow and Email Templates to perform crucial outreach on their behalf.

Using record-triggered Flows, you can personalize standard emails with customer data using merge tags and automate them in real time.

Smaller businesses could circumvent the need for larger, costly marketing automation platforms by building engagement plans, customer journeys, list emails, and individual emails utilizing Flow and Lightning Email Templates.

Here are some use cases for building automated emails in your Salesforce CRM:

•  An Opportunity is closed/won: Send a standard email to the customer with personalized details about their deal to congratulate them or provide next steps or a warranty.

•  You’ve completed a consultation with a Lead: When you mark your Event as complete, send a ‘Thanks for your time’ email.

•  A client has scheduled an appointment: Send a confirmation email with the appointment details.

•  A subscription is expiring soon: Send a reminder to renew.

•  Payment date is approaching: Send a payment-due notification with a link to the payment page.

•  A support case is closed: Send a survey.

•  Client, Employee, or Partner birthday: Send a ‘Happy Birthday’ email.

The opportunities are limited only to our imagination! Contact The CRM Firm to talk with one of our consultants and discover more creative ways to automate your email messaging.

 

Preparing to Automate Emails

Start a conversation with business stakeholders to identify areas of the business where they manually send emails. Help determine when or where in their processes they could benefit from additional email communication if it didn’t require additional time from staff. Write up the use cases.

For each use case, identify the following—

#1 – Who should the email go to?

•  Salesforce currently limits the Recipient Address list to five or fewer recipients. There are creative workarounds, but in this simple use case, we’ll assume there are five or fewer recipients (internal or external).

#2 – Determine who will provide the email content.

•  End users can configure Lightning Templates through the UI. Check out this Help Article from Salesforce about working with Lightning Templates.

#3 – What data points should be included to help personalize the email?

•  If the data points don’t yet exist in Salesforce, create them on the appropriate objects(s) and identify and implement ways to ensure the data is reliably captured (eg. required fields, validation rules).

#4 – At what point in the constituents’ Salesforce journey should they receive the email?

•  Ensure there is a data point in Salesforce that can serve as a trigger, or add one. (eg. Opportunity Status = Closed/Won, a checkbox is checked, or run a scheduled Flow on a date to send the email when today = DateField__c).

How Do We Automate Emails?

The Salesforce platform is an ever-evolving platform offering more than one way to accomplish your goal, which can be overwhelming. Continue reading for steps to configure email automation methods using the most current functionality, and cover most of the basic use cases for automating emails.

CONSIDERATIONS:  If you have a high volume of emails going out at once or must include something in the Email that the Lightning Template can’t accommodate (for example, data from related objects), and other general limitations. Click here for more information about General Email Limits.

Step 1: Enable LightNing Email Templates

To ensure that Lightning Email Templates have been enabled within your Salesforce org, and the correct users have access to create and manage these templates, check out this post from Salesforce Ben: Your Guide to Salesforce Lightning Email Templates.

 

Step 2: Create a Lightning Email Template

Why not Classic Templates?

Using the Email Template Builder provides a modern, user-friendly interface for building attractive emails, and it is accessible to users via the UI. Alternatively, the Classic Email Templates have an antiquated configuration screen and can only be built and edited in setup.

1. From the App Launcher, launch “Email Templates”

2. Click the “New Email Template” button

Tip: Be sure to select or create a Folder that’s not private to store email templates that will be used in automation and select the correct Object to gain access to merge fields.

3. Click “Edit in Builder”

4. Design your custom email template using the user-friendly interface

Tip: Use merge tags for a more personalized email to insert dynamic content related to the Salesforce data of the recipient. Ensure all merge fields are from the triggering object, the recipient, or the sender.

 

More complex use case: If you want to include data from related objects in the Email, you can either formula the data into the triggering object or use Text Templates in Flow to create the Email, as Lightning Templates do not yet support cross-object merge fields. You can Upvote it on the Idea Exchange here.

 

Step 3: Build a Flow

As Salesforce continues to phase out the OG automation tools, Workflow Rule and Process Builder, follow best practices by creating new or migrating existing automation to Salesforce Flow. The two most common types of Flow you’ll use to deliver your automated emails are Record-Triggered and Schedule-Triggered.

If you want to trigger an Email to send at a point in time (For example, An opportunity is Closed/Won, a Case is closed, and an Event is complete), use a Record-Triggered Flow.

To send an Email on a certain date (For example: a birthday, subscription expiring, or payment due date), use a Schedule-Triggered Flow.

1. Create your new Flow using the appropriate entry criteria.

2. Get your Template ID.

You can copy and paste the ID of the Lightning Template record into the Email Template ID field OR you can be a super admin and follow the best practice of not hardcoding IDs. Simply add a Get to your Flow before your Action to retrieve the ID for the template you will be using, and add the Flow variable for your Get into the Email Template ID field. Eg .{!Get_Email_Template.Id}

HOW TO “GET” YOUR TEMPLATE

  • Add a Get Records element.
  • Hover over Add Element and click Add Element.
  • In the search bar, enter Get Records, and then click Get Records.
  • For Label, enter Get Email Template and use the default API name Get_Email_Template.
  • For Object, enter Email Template and select Email Template.
  • In the Filter Email Template Records section, for Field, select Name (Email Template Name). For Operator, select Equals. For Value, enter the name of the existing email template to use, for example, New Contact Email.Template.
  • Use the default values for the other fields, and click Done.

3. If there is more than 1 recipient, create your recipient collection.

4. Add the Send Email Action and populate the variables.

Why Not Use An Email Alert Action?

While both can utilize the Lightning Template that was created, the Send Email Action provides more flexibility. The advantages of Send Email Action over Email Alert Action are:

•  You can retrieve recipient email addresses from cross-objects without having a lookup field on the triggering object as you need to include a dynamic Email Address field on an Email Alert.

•  You can Log Emails as an Activity to the related records (as of Summer ‘23!).

•  If your email requires more complex requirements like cross-object merge fields or tables, you can use a Text Template resource for your Email instead of Lightning Templates.

•  Keep your org consistent – if you always use Send Email Action as the more versatile method then future maintenance will be more intuitive.

5. TEST! Debug or Activate and test your new Flow to be sure all is working as expected.

Tip: Improve Email Deliverability by adding an Org-Wide Email Address for your automated emails, and utilizing that as the Sender address in your Send Email Action.

Whether you are using Flows to create an automated marketing solution, deliver email messages for a proactive subscription renewal process, or even internally to remind your Sales team of high-profile deadlines related to Opportunities, creating efficiency and consistency with automation is a clear path forward throughout all of your business processes. Contact The CRM Firm today to plan your organization’s automated email journey!

Further Reading On This Topic:

Flow: How To Send Emails In Two Ways

Flow Example: Send and Log an Email to a New Contact

Flow Core Action: Send Email

Improve Deliverability of Emails Sent from Salesforce

 

Looking to learn more about automated email marketing inside Salesforce?

•  Check out this blog to learn more about Pardot and Salesforce Marketing Cloud for your business.

•  Or this blog to learn about email campaigns and deliverability, and getting the most out of your email sends.

RELATED POSTS