DocGen & eSign

Creating a Lightning Email Template in Salesforce

Overview

This document is a guide for creating and using Lightning Email Templates in Salesforce. It outlines how to navigate to Email Templates, create and configure a template, design its content, make it available for use, and use it in Salesforce workflows.

  1. Log in to Salesforce.

  2. Click on the App Launcher (nine-dot grid icon) in the upper left corner.

  3. Search and select "Email Templates".


Create a New Lightning Email Template

  1. Click "New Email Template".

  2. Select "Lightning" as the template type.

  3. Click "Next".


Enter Template Information

Fill out the following fields:

  1. Template Name: Give your template a clear and descriptive name.

  2. Related Entity Type: Select the Salesforce object (standard or custom) the template will reference (e.g., Opportunity, Account, Custom Object).

  3. Description: (optional) Provide details for clarity about the purpose of this template.

  4. Folder: Select the appropriate folder to store the template.

Click "Next".


Design Your Email Template

  1. Use the Lightning email editor to create your template:

  • Enter the Subject of your email.

  • Use the rich text editor to compose your email content.

  • Insert merge fields to personalize emails dynamically.

    • Example: {!Contact.FirstName} or {!Opportunity.Name}

  • You can add images, links, tables, and formatting as needed.

  • Sample HTML Code

This is a sample HTML code. Please customize the template to align with your company’s marketing guidelines and business objectives.

HTML
<html style="overflow-y: hidden;">
<head>
	<title></title>
</head>
<body class="em_body" style="min-width: 100%; background-color: rgb(251, 251, 251); padding: 0px; margin: 0px auto !important; height: auto; min-height: auto;">
<table align="center" border="0" cellpadding="0" cellspacing="0" class="em_full_wrap" style="background-color:#fbfbfb;" width="100%">
	<tbody>
		<tr>
			<td align="center" style="padding:10px;" valign="top">
			<table align="center" border="0" cellpadding="0" cellspacing="0" class="em_main_table" style="table-layout:fixed;" width="600">
				<tbody>
					<tr>
						<td bgcolor="#ffffff" class="em_hide" style="line-height:1px;min-width:600px;"><img border="0" height="1" src="./Sample_Template_files/spacer.gif" style="max-height:1px; min-height:1px; display:block; width:600px; min-width:600px;" width="600" /></td>
					</tr>
					<tr>
						<td>
						<table bgcolor="#fbfbfb" border="0" cellpadding="0" cellspacing="0" width="100%">
							<tbody>
								<tr>
									<td class="em_hide" width="30">&nbsp;</td>
									<td class="em_side_space" valign="top">
									<table border="0" cellpadding="0" cellspacing="0" width="100%">
										<tbody>
											<tr>
												<td height="15" style="line-height:1px;font-size:1px;">&nbsp;</td>
											</tr>
											<tr>
											</tr>
											<tr>
												<td height="15" style="line-height:1px;font-size:1px;">&nbsp;</td>
											</tr>
										</tbody>
									</table>
									</td>
									<td class="em_hide" width="30">&nbsp;</td>
								</tr>
							</tbody>
						</table>
						</td>
					</tr>
					<tr>
						<td bgcolor="#ffffff" style="background-color:#ffffff;border-radius:5px;box-shadow:1px 1px 10px 1px #dddddd;">
						<table border="0" cellpadding="0" cellspacing="0" width="100%">
							<tbody>
								<tr>
									<td>
									<table border="0" cellpadding="0" cellspacing="0" width="100%">
										<tbody>
											<tr>
												<td height="25" style="line-height:10px;">&nbsp;</td>
											</tr>
											<tr>
												<td>
												<p style="text-align: center;"><img alt="images" src="https://cmdocument-dev-ed.develop.file.force.com/file-asset-public/docgen_esign__images?oid=00DDn00000DttlG" style="max-width: 1212.2px; width: 528px; height: 91px;" title="images" /></p>
												</td>
											</tr>
											<tr>
												<td height="20" style="line-height: 10px; text-align: center;">&nbsp;</td>
											</tr>
										</tbody>
									</table>
									</td>
								</tr>
								<tr>
									<td>
									<table border="0" cellpadding="0" cellspacing="0" width="100%">
										<tbody>
											<tr>
												<td align="center" background="https://bankconnectpackaging-dev-ed--c.documentforce.com/sfc/dist/version/renditionDownload?rendition=ORIGINAL_Jpg&versionId=0683j000008Eaph&operationContext=DELIVERY&contentId=05T3j00000TnBPu&page=0&d=/a/3j000000M0QY/0b4qYZuV3dl7kAUs4fCe2vQd0z.aLPhzEl81tOuxRZc&oid=00D3j000000i85o&dpt=null&viewId=" class="em_bg_center" style="background:url('https://i.imgur.com/MZL8kQO.jpg');background-color: #004F95;-webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover;background-position: top center;" valign="top">
												<table align="center" border="0" cellpadding="0" cellspacing="0" width="90%">
													<tbody>
														<tr>
															<td height="50" style="line-height:1px;font-size:1px;">&nbsp;</td>
														</tr>
														<tr>
															<td class="em_dark_grey_txt" style="font-family:'Open Sans', Arial, sans-serif;font-size:27px;text-align:center;text-transform:none;color:#ffffff;letter-spacing:0px;font-weight:300;">Document Verification Required</td>
														</tr>
														<tr>
															<td height="10" style="line-height:1px;font-size:1px;">&nbsp;</td>
														</tr>
														<tr>
															<td class="em_grey_txt" style="font-family:'Open Sans', Arial, sans-serif;font-size:14px;text-align:center;padding-left:0px;padding-right:0px;color:#ffffff;line-height:24px;font-weight:400;letter-spacing: 2px;">&nbsp;</td>
														</tr>
														<tr>
															<td height="50" style="line-height:1px;font-size:1px;">&nbsp;</td>
														</tr>
													</tbody>
												</table>
												</td>
											</tr>
										</tbody>
									</table>
									</td>
								</tr>
								<tr>
									<td>
									<table border="0" cellpadding="0" cellspacing="0" width="100%">
										<tbody>
											<tr>
												<td class="em_hide" width="40">&nbsp;</td>
												<td class="em_side_space" valign="top">
												<table border="0" cellpadding="0" cellspacing="0" width="100%">
													<tbody>
														<tr>
															<td height="40" style="line-height:1px;font-size:1px;">&nbsp;</td>
														</tr>
														<tr>
															<td class="em_grey_txt" style="font-family:'Open Sans', Arial, sans-serif;font-size:16px;text-align:left;padding-left:0px;padding-right:0px;color:#333333;line-height:24px;font-weight:300;">Hello {signer}, br />
															&nbsp;
															<p style="font-family:'Open Sans', Arial, sans-serif;font-size:18px;text-align:center;padding-left:0px;padding-right:0px;color:#0e6b0e;line-height:24px;font-weight:700;">Thank you for Submitting the Application!!</p>
															<br />
															Please Click the Below Link to verify your details so that we can proceed with your application.<br />
															&nbsp;</td>
														</tr>
														<tr>
															<td height="30" style="line-height:1px;font-size:1px;">&nbsp;</td>
														</tr>
														<tr>
															<td>
															<table align="center" border="0" cellpadding="0" cellspacing="0" width="160">
																<tbody>
																	<tr>
																		<td bgcolor="#003791" height="45" style="padding-left: 10px;padding-right: 10px;font-family:'Open Sans', Arial, sans-serif;font-size:14px;text-align:center;border-radius:5px;color:#ffffff;letter-spacing:1px;text-transform:uppercase;font-weight:300;" valign="middle"><a href="{url}" style="text-decoration:none;color:#ffffff;display:block;line-height:45px;" target="_blank">Verify Details </a></td>
																	</tr>
																</tbody>
															</table>
															</td>
														</tr>
														<tr>
															<td height="30" style="line-height:1px;font-size:12px;text-align:center;font-family:'Open Sans', Arial, sans-serif;letter-spacing:1px;">&nbsp;&nbsp;</td>
														</tr>
														<tr>
															<td class="em_grey_txt" style="font-style:italic;font-family:'Open Sans', Arial, sans-serif;font-size:16px;text-align:left;padding-left:0px;padding-right:0px;color:#333333;line-height:24px;font-weight:300;">Regards,<br />
															{{{Sender.Name}}}<br />
															&nbsp;</td>
														</tr>
														<tr>
															<td height="50" style="line-height:1px;font-size:1px;">&nbsp;</td>
														</tr>
													</tbody>
												</table>
												</td>
												<td class="em_hide" width="40">&nbsp;</td>
											</tr>
										</tbody>
									</table>
									</td>
								</tr>
								<tr>
									<td bgcolor="#003791" style="background-color:#003791;border-radius:0px 0px 5px 5px;">
									<table border="0" cellpadding="0" cellspacing="0" width="100%">
										<tbody>
											<tr>
												<td height="30" style="line-height:1px;font-size:1px;">&nbsp;</td>
											</tr>
											<tr>
												<td>
												<table border="0" cellpadding="0" cellspacing="0" width="100%">
													<tbody>
														<tr>
															<td class="em_hide" width="30">&nbsp;</td>
															<td>
															<table border="0" cellpadding="0" cellspacing="0" width="100%">
																<tbody>
																	<tr>
																		<td>
																		<table align="left" border="0" cellpadding="0" cellspacing="0" class="em_wrapper" width="290">
																			<tbody>
																				<tr>
																					<td>
																					<table align="center" border="0" cellpadding="0" cellspacing="0" class="em_wrapper" width="290">
																						<tbody>
																							<tr>
																								<td class="em_align_center" style="font-family:'Open Sans', Arial, sans-serif;font-size:14px;text-align:left;padding-left:0px;padding-right:0px;color:#ffffff;line-height:24px;font-weight:300;"><span style="font-weight:700;">CONTACT US</span></td>
																							</tr>
																							<tr>
																								<td height="5" style="line-height:1px;font-size:1px;">&nbsp;</td>
																							</tr>
																							<tr>
																								<td>
																								<table align="left" border="0" cellpadding="0" cellspacing="0" class="em_wrapper">
																									<tbody>
																										<tr>
																										</tr>
																										<tr>
																											<td>
																											<table align="center" border="0" cellpadding="0" cellspacing="0">
																												<tbody>
																													<tr>
																														<td style="padding-right:2px;" width="12"><img alt="ico" border="0" height="9" src="https://bankconnectpackaging-dev-ed--c.documentforce.com/sfc/dist/version/renditionDownload?rendition=ORIGINAL_Png&versionId=0683j000008Eapi&operationContext=DELIVERY&contentId=05T3j00000TnBPz&page=0&d=/a/3j000000M0QT/YBWS_xMsiOYPQjFfZ9inGowzC4To4ckFjSOcEs40QDc&oid=00D3j000000i85o&dpt=null&viewId=" style="display:block;border:none; max-width:11px;" width="11" /></td>
																														<td style="padding-left:3px;font-family:'Open Sans', Arial, sans-serif;font-size:12px;text-align:left;color:#ffffff;line-height:20px;font-weight:300;">your phone</td>
																													</tr>
																												</tbody>
																											</table>
																											</td>
																										</tr>
																									</tbody>
																								</table>
																								</td>
																							</tr>
																							<tr>
																								<td style="padding-top:1px;">
																								<table align="left" border="0" cellpadding="0" cellspacing="0" class="em_wrapper">
																									<tbody>
																										<tr>
																											<td>
																											<table align="center" border="0" cellpadding="0" cellspacing="0">
																												<tbody>
																													<tr>
																														<td style="padding-right:2px;" width="12"><img alt="ico" border="0" height="9" src="https://bankconnectpackaging-dev-ed--c.documentforce.com/sfc/dist/version/renditionDownload?rendition=ORIGINAL_Png&versionId=0683j000008Eapn&operationContext=DELIVERY&contentId=05T3j00000TnBQO&page=0&d=/a/3j000000M0QE/0kzi_Plttg4VtM_LyppTuFZHeJeeY2IukNONwwM.ZaI&oid=00D3j000000i85o&dpt=null&viewId=" style="display:block;border:none; max-width:11px;" width="11" /></td>
																														<td style="padding-left:3px;font-family:'Open Sans', Arial, sans-serif;font-size:12px;text-align:left;color:#ffffff;line-height:20px;font-weight:300;">your email</td>
																													</tr>
																												</tbody>
																											</table>
																											</td>
																										</tr>
																									</tbody>
																								</table>
																								</td>
																							</tr>
																							<tr>
																								<td style="padding-top:1px;">
																								<table align="left" border="0" cellpadding="0" cellspacing="0" class="em_wrapper">
																								</table>
																								</td>
																							</tr>
																						</tbody>
																					</table>
																					</td>
																				</tr>
																			</tbody>
																		</table>

																		<table align="right" border="0" cellpadding="0" cellspacing="0" class="em_wrapper" width="250">
																			<tbody>
																				<tr>
																					<td class="em_pad_top">
																					<table align="center" border="0" cellpadding="0" cellspacing="0" width="250">
																						<tbody>
																							<tr>
																								<td height="5" style="line-height:1px;font-size:1px;">&nbsp;</td>
																							</tr>
																							<tr>
																								<td>
																								<table align="right" border="0" cellpadding="0" cellspacing="0" class="em_wrapper" width="160">
																									<tbody>
																										<tr>
																											<td>
																											<table align="center" border="0" cellpadding="0" cellspacing="0" width="160">
																												<tbody>
																													<tr>
																														<td height="40" width="40"><a class="modimg" href="https://www.linkedin.com/company/cloud-maven-inc/" style="color:#7B9C4D;"><img alt="fb" border="0" height="40" src="https://bankconnectpackaging-dev-ed--c.documentforce.com/sfc/dist/version/renditionDownload?rendition=ORIGINAL_Png&versionId=0683j000008Eapc&operationContext=DELIVERY&contentId=05T3j00000TnBPk&page=0&d=/a/3j000000M0QZ/otK1QNePsjyoYIdBjBQu3SyuAu.PU9XgOcqXbfvVSq0&oid=00D3j000000i85o&dpt=null&viewId=" style="max-width:40px;display:block; border: none;" width="40" /></a></td>
																														<td width="20">&nbsp;</td>
																														<td height="40" width="40"><a class="modimg" href="https://twitter.com/CloudMavenInc" style="color:#7B9C4D;"><img alt="tw" border="0" height="40" src="https://bankconnectpackaging-dev-ed--c.documentforce.com/sfc/dist/version/renditionDownload?rendition=ORIGINAL_Png&versionId=0683j000008Eapj&operationContext=DELIVERY&contentId=05T3j00000TnBQ4&page=0&d=/a/3j000000M0QO/_kbdsH0ZJ5YcNYoXqxcMGFaIfNvaleTAQqYYxNgxkaY&oid=00D3j000000i85o&dpt=null&viewId=" style="max-width:40px;display:block; border: none;" width="40" /></a></td>
																														<td width="20">&nbsp;</td>
																														<td height="40" width="40"><a class="modimg" href="https://www.youtube.com/channel/UCoVpK_sfgozJln5JHPV4f7Q" style="color:#7B9C4D;"><img alt="g+" border="0" height="40" src="https://bankconnectpackaging-dev-ed--c.documentforce.com/sfc/dist/version/renditionDownload?rendition=ORIGINAL_Png&versionId=0683j000008Eapk&operationContext=DELIVERY&contentId=05T3j00000TnBQE&page=0&d=/a/3j000000M0QK/oZ_xrzzObd70lRT.P1CsPAefK3mIqmqMHaKgHpv0JVA&oid=00D3j000000i85o&dpt=null&viewId=" style="max-width:40px;display:block; border: none;" width="40" /></a></td>
																													</tr>
																												</tbody>
																											</table>
																											</td>
																										</tr>
																									</tbody>
																								</table>
																								</td>
																							</tr>
																							<tr>
																								<td height="22" style="line-height:1px;font-size:1px;">&nbsp;</td>
																							</tr>
																							<tr>
																								<td class="em_align_center" style="font-family:'Open Sans', Arial, sans-serif;font-size:12px;text-align:right;padding-left:0px;padding-right:0px;color:#ffffff;line-height:24px;font-weight:300;">&copy;Cloud Maven, All Rights Reserved</td>
																							</tr>
																						</tbody>
																					</table>
																					</td>
																				</tr>
																			</tbody>
																		</table>
																		</td>
																	</tr>
																</tbody>
															</table>
															</td>
															<td class="em_hide" width="30">&nbsp;</td>
														</tr>
													</tbody>
												</table>
												</td>
											</tr>
										</tbody>
									</table>
									</td>
								</tr>
							</tbody>
						</table>
						</td>
					</tr>
					<tr>
						<td height="20" style="line-height:1px;font-size:1px;">&nbsp;</td>
					</tr>
				</tbody>
			</table>
			</td>
		</tr>
	</tbody>
</table>

<div style="display:none; white-space:nowrap; font:20px courier; color:#ffffff; background-color:#ffffff;">- - - - - - - - - - - - - - - - - - - - - - -</div>

<div id="" style="left: 537.5px; top: 82px;">&nbsp;</div>

<div id="" style="left: 537.5px; top: 82px;">&nbsp;</div>

<div id="" style="left: 530.5px; top: 82px;">&nbsp;</div>

<div id="" style="left: 530.5px; top: 82px;">&nbsp;</div>
</body>
</html>

Click "Save" when your email template is ready.


Make the Template Available for Use

  • Ensure the template is saved in an accessible folder.

  • Confirm it's available to the relevant Salesforce users or profiles.


Using the Lightning Email Template

  1. Your Lightning Email Template can be selected directly in email actions or automation processes such as DocGen & eSign workflows, email alerts, or sending emails from Salesforce records.

https://help.salesforce.com/s/articleView?id=sales.email_create_a_template.htm&type=5

🎉 Congratulations! Your Lightning Email Template is now successfully created and ready to streamline your email communications in Salesforce.