top of page
Writer's pictureD.Khare

HOW TO SEND EMAIL TEMPLATE WITH TABLE FROM FLOW SALESFORCE

Updated: Nov 8, 2023


Send Email Template with Table from Flow Salesforce

Have you ever thought of sending emails with tables attached? As for now, there is no direct option in the flow to add tables. Let’s understand and see how we can send emails with tables via flow using a classic email template with HTML. This knowledge is impactful when sending emails with data for better understanding and presentation.

How tp create flow in salesforce

Let’s see how you can achieve the requirement with the help of my example. I will explain it to you in the following steps:

  1. Create a classic email template with an HTML body.

  2. Create an email alert.

  3. Create a flow with Email Alert

  4. The Final Output


Step 1: How to create a classic email template with an HTML body.

Let's begin by creating a classic email template with HTML. To learn more on how to create a classic email template, refer here. Name the template ”Test email template for table". Choose a custom template type. In the “HTML Body” page, enter the HTML source text for the message as given below:

Note: You can customize the message as per your requirements.

<span style="color: rgb(8, 144, 240);">Dear Team,</span><br><br><span style="color: rgb(8, 144, 240);">Test template is initiated.</span>
<pstyle="color: rgb(8, 144, 240);">Case Number:&nbsp;<strong>{!Case.CaseNumber}</strong>
<br>Case Reason:&nbsp;<strong>{!Case.Reason}</strong>
<br>Contact Name:&nbsp;<strong>{!Case.Contact}</strong>
<br>Initiated Date & Time:&nbsp;<strong>{!Case.CreatedDate}</strong></p>
<br><br><table class="ql-table-blob" style="width:100%; border: 1px solid black;"><tbody><tr><th style="border: 1px solid black;">Team</th><th style="border: 1px solid black;">Action</th></tr><tr></tr><tr><td style="border: 1px solid black;">Area Variation</td><td style="border: 1px solid black;">Review the case and take the required action</td></tr><tr><td style="border: 1px solid black;">System Admin</td><td style="border: 1px solid black;">Review the reason and Click OK</td></tr></tbody></table><br>Note: This is a system generated email, do not reply to this.
Create email template

Html Email Content

The HTML preview will look like the image given below:

Email Template preview

Step 2: Create an email alert

Create an email alert “Template for Email with tables” from the setup with the previously created email test template. Recipients can be just your users. Refer image given below:

Template for Email with table

Step 3: Create a flow with Email Alert

Create a Record Triggered flow on Case "Email with tables" which executes on create/update. No entry conditions are required. Add Email Alert element with “Template for Email with tables”.Refer image given below:




Step 4: The Final Output


Happy!! to help you add to your knowledge. You can leave a comment to help me understand how the blog helped you. If you need further assistance, please contact us. You can click "Reach Us" on the website and share the issue with me.


Blog Credit:

D. Khare

S. Chaudhary

Salesforce Developer

Avenoir Technologies Pvt. Ltd.



Reach us: team@avenoir.ai

Комментарии


bottom of page