---
schema_version: "1"
id: a1f0de935b165de0701e96207122a4ce37d0b1d3ca40ed16c23d470115a9f32e
title: Use Visualforce Classic Email Templates in Automation
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/sales/264-0-0/email_templates_vf_automation.md
canonical_url: https://help.salesforce.com/s/articleView?id=sales.email_templates_vf_automation.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 6521a896097e88b1f450ba360b05b447ec917e422ee610e91d0552fae4729328
description: Workflows and other automations are executed in a system context. User–level limitations don’t apply when the automations use Custom, HTML, or Text Classic email templates. A user’s visibility to fields and records to apply to Visualforce Classic email templates.
products:
  - Sales Cloud
  - Cross Cloud
  - Service Cloud Voice
release: "264"
---
# Use Visualforce Classic Email Templates in Automation

Workflows and other automations are executed in a system context. User–level limitations don’t apply when the automations use Custom, HTML, or Text Classic email templates. A user’s visibility to fields and records to apply to Visualforce Classic email templates.

### 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;">Available in: Salesforce Classic and
            Lightning Experience</td>

        </tr>
        <tr class="">
          <td class="slds-cell-wrap" style="vertical-align:top;">
            <p>Available in: <strong>Essentials</strong>, <strong>Enterprise</strong>, <strong>Performance</strong>,
              <strong>Unlimited</strong>, and <strong>Developer</strong> Editions
            </p>
            <p style="margin-bottom:0;" id="email_templates_vf_automation__mass_email_edition_exceptions"><a name="email_templates_vf_automation__mass_email_edition_exceptions"><!-- --></a>Mass
              email not available in: <strong>Personal</strong>, <strong>Contact Manager</strong>, and <strong>Group</strong> Editions
            </p>
          </td>

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

The result of an automation that uses a Classic email template with merge fields differs when the template is a Visualforce Classic email template.

In the following scenarios, assume that the org has an Admin user and a standard user.

## Scenario 1: Hidden Fields

Imagine that the Admin has hidden a field in an entity from the standard user. Two Classic email templates—one Visualforce and one HTML—have a merge field referencing the hidden field.

When the standard user inserts either Classic email template into the email composer, the field value isn’t substituted. As expected, the merge field evaluates to a blank.

Now imagine a workflow rule. It’s configured to send email alerts using a Classic email template. The alert fires when certain account fields are edited. If the standard user edits a field and triggers the alert, an email is sent using the template.

- When the workflow specifies the Visualforce Classic email template, the field value evaluates to a blank.
- When the workflow specifies the HTML Classic email template, the field value is substituted.

## Scenario 2: Hidden Records

Imagine that the admin has changed the org’s sharing settings. They’re set to private for records: only the record owner or the admin can access a record.

Imagine a workflow configured to fire an email when a record owner changes. The alert uses a Classic email template that includes the record owner’s info and name.

When the standard user modifies a record and updates the owner field, the user loses access to that record. The change also triggers the email alert Workflow.

- When the workflow specifies the Visualforce Classic email template, the email isn’t sent and the user is redirected to an error page.
    
    The Visualforce template retrieves the merge field value from the database, not the cache.
- When the workflow specifies the HTML Classic email template, the email is sent and the owner field shows the new value.
    
    The HTML template resolves the merge field even though the user lost access to the record.