cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Customised Email Template

Hi Everyone,

 

I want to send a customised email and I am working on it from past two days and unable to solve it.

 

Attached is the template that I want to add in email.

 

Neel_Sharma_2-1599627657299.png

 

Any help is greatly appreciated. Thanks! 

1 ACCEPTED SOLUTION

Accepted Solutions

 

<tr style="height:.2in">
<td width="136" nowrap="" valign="bottom" style="width:102.0pt;border-top:none;border-left:none;border-bottom:solid white 1.0pt;border-right:solid white 1.0pt;background:#B4C6E7;padding:0in 5.4pt 0in 5.4pt;height:.2in">
</td>
<td width="143" nowrap="" valign="bottom" style="width:107.0pt;border:none;border-bottom:solid white 1.0pt;background:#B4C6E7;padding:0in 5.4pt 0in 5.4pt;height:.2in">
</td>
</tr>

@Anonymous 

so say you have your template here in excel as below:

 

1. Step no. copy and paste this in an email as below in your normal outlook like below and send it to yourself

Mira_Ghaly_1-1599630583377.png

2. Open the Received email , Click on Actions-> Other Actions ->View Source, this will render the HTML

Mira_Ghaly_3-1599630705374.png

3. Now you have to extract the Repeating part in your table, so now you will have to retrieve the repeating data and concatenate to it the repeating part.

So say this is the full html

 

<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri",sans-serif;}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:"Calibri",sans-serif;
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-family:"Calibri",sans-serif;}
@page WordSection1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="279" style="width:209.0pt;border-collapse:collapse">
<tbody>
<tr style="height:.2in">
<td width="136" nowrap="" valign="bottom" style="width:102.0pt;padding:0in 5.4pt 0in 5.4pt;height:.2in">
<p class="MsoNormal"><span style="color:black">Title :<o:p></o:p></span></p>
</td>
<td width="143" nowrap="" valign="bottom" style="width:107.0pt;padding:0in 5.4pt 0in 5.4pt;height:.2in">
</td>
</tr>
<tr style="height:.2in">
<td width="136" nowrap="" valign="bottom" style="width:102.0pt;border-top:none;border-left:none;border-bottom:solid white 1.5pt;border-right:solid white 1.0pt;background:#4472C4;padding:0in 5.4pt 0in 5.4pt;height:.2in">
<p class="MsoNormal"><b><span style="color:white">Name<o:p></o:p></span></b></p>
</td>
<td width="143" nowrap="" valign="bottom" style="width:107.0pt;border:none;border-bottom:solid white 1.5pt;background:#4472C4;padding:0in 5.4pt 0in 5.4pt;height:.2in">
<p class="MsoNormal"><b><span style="color:white">Positions<o:p></o:p></span></b></p>
</td>
</tr>
<tr style="height:.2in">
<td width="136" nowrap="" valign="bottom" style="width:102.0pt;border-top:none;border-left:none;border-bottom:solid white 1.0pt;border-right:solid white 1.0pt;background:#B4C6E7;padding:0in 5.4pt 0in 5.4pt;height:.2in">
</td>
<td width="143" nowrap="" valign="bottom" style="width:107.0pt;border:none;border-bottom:solid white 1.0pt;background:#B4C6E7;padding:0in 5.4pt 0in 5.4pt;height:.2in">
</td>
</tr>
<tr style="height:.2in">
<td width="136" nowrap="" valign="bottom" style="width:102.0pt;border-top:none;border-left:none;border-bottom:solid white 1.0pt;border-right:solid white 1.0pt;background:#D9E1F2;padding:0in 5.4pt 0in 5.4pt;height:.2in">
</td>
<td width="143" nowrap="" valign="bottom" style="width:107.0pt;border:none;border-bottom:solid white 1.0pt;background:#D9E1F2;padding:0in 5.4pt 0in 5.4pt;height:.2in">
</td>
</tr>
<tr style="height:.2in">
<td width="136" nowrap="" valign="bottom" style="width:102.0pt;border-top:none;border-left:none;border-bottom:solid white 1.0pt;border-right:solid white 1.0pt;background:#B4C6E7;padding:0in 5.4pt 0in 5.4pt;height:.2in">
</td>
<td width="143" nowrap="" valign="bottom" style="width:107.0pt;border:none;border-bottom:solid white 1.0pt;background:#B4C6E7;padding:0in 5.4pt 0in 5.4pt;height:.2in">
</td>
</tr>
<tr style="height:.2in">
<td width="136" nowrap="" valign="bottom" style="width:102.0pt;border-top:none;border-left:none;border-bottom:solid white 1.0pt;border-right:solid white 1.0pt;background:#D9E1F2;padding:0in 5.4pt 0in 5.4pt;height:.2in">
</td>
<td width="143" nowrap="" valign="bottom" style="width:107.0pt;border:none;border-bottom:solid white 1.0pt;background:#D9E1F2;padding:0in 5.4pt 0in 5.4pt;height:.2in">
</td>
</tr>
<tr style="height:.2in">
<td width="136" nowrap="" valign="bottom" style="width:102.0pt;border-top:none;border-left:none;border-bottom:solid white 1.0pt;border-right:solid white 1.0pt;background:#B4C6E7;padding:0in 5.4pt 0in 5.4pt;height:.2in">
</td>
<td width="143" nowrap="" valign="bottom" style="width:107.0pt;border:none;border-bottom:solid white 1.0pt;background:#B4C6E7;padding:0in 5.4pt 0in 5.4pt;height:.2in">
</td>
</tr>
<tr style="height:.2in">
<td width="136" nowrap="" valign="bottom" style="width:102.0pt;border-top:none;border-left:none;border-bottom:solid white 1.0pt;border-right:solid white 1.0pt;background:#D9E1F2;padding:0in 5.4pt 0in 5.4pt;height:.2in">
</td>
<td width="143" nowrap="" valign="bottom" style="width:107.0pt;border:none;border-bottom:solid white 1.0pt;background:#D9E1F2;padding:0in 5.4pt 0in 5.4pt;height:.2in">
</td>
</tr>
<tr style="height:.2in">
<td width="136" nowrap="" valign="bottom" style="width:102.0pt;border-top:none;border-left:none;border-bottom:solid white 1.0pt;border-right:solid white 1.0pt;background:#B4C6E7;padding:0in 5.4pt 0in 5.4pt;height:.2in">
</td>
<td width="143" nowrap="" valign="bottom" style="width:107.0pt;border:none;border-bottom:solid white 1.0pt;background:#B4C6E7;padding:0in 5.4pt 0in 5.4pt;height:.2in">
</td>
</tr>
<tr style="height:.2in">
<td width="136" nowrap="" valign="bottom" style="width:102.0pt;border:none;border-right:solid white 1.0pt;background:#D9E1F2;padding:0in 5.4pt 0in 5.4pt;height:.2in">
</td>
<td width="143" nowrap="" valign="bottom" style="width:107.0pt;border:none;background:#D9E1F2;padding:0in 5.4pt 0in 5.4pt;height:.2in">
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
</body>
</html>

 

 

So the Repeating TR is as below:

<tr style="height:.2in">
<td width="136" nowrap="" valign="bottom" style="width:102.0pt;border-top:none;border-left:none;border-bottom:solid white 1.0pt;border-right:solid white 1.0pt;background:#B4C6E7;padding:0in 5.4pt 0in 5.4pt;height:.2in">
</td>
<td width="143" nowrap="" valign="bottom" style="width:107.0pt;border:none;border-bottom:solid white 1.0pt;background:#B4C6E7;padding:0in 5.4pt 0in 5.4pt;height:.2in">
</td>
</tr>

 

So you will need to loop on your raw data and construct the Repeating part and save it in a variable

4. In your Email you have to Do like Concatenation to the HTML instead of Copy and Paste

So for your HTML you have to concatenate as concat(FirstStaticPart,variables(Repeating Part), EndStaticPart) and pass this composed action to your email.

 

This is a very complicated approach but it will work ; so it will be easier if you used word templates.

 

 

 

 

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

View solution in original post

3 REPLIES 3
Mira_Ghaly
Dual Super User II
Dual Super User II

@Anonymous 

So how you are currently constructing it in flow as HTML inside the email step?

I suggest using word templates and use the generated document as an attachment instead.

 

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here
Anonymous
Not applicable

Yes right now I am trying to construct it in flow as html inside the mail step.

 

No I don't want to add any attachments to the mail. Just a simple mail with the above template as copy pasted in the mail rather than adding it as an attachment.

 

Right now what we do is manually copy paste the attached template from excel and paste it into email and then send it. 

 

But now to automate this we are getting the raw data then we have to create this template and then fill the values in it.

 

<tr style="height:.2in">
<td width="136" nowrap="" valign="bottom" style="width:102.0pt;border-top:none;border-left:none;border-bottom:solid white 1.0pt;border-right:solid white 1.0pt;background:#B4C6E7;padding:0in 5.4pt 0in 5.4pt;height:.2in">
</td>
<td width="143" nowrap="" valign="bottom" style="width:107.0pt;border:none;border-bottom:solid white 1.0pt;background:#B4C6E7;padding:0in 5.4pt 0in 5.4pt;height:.2in">
</td>
</tr>

@Anonymous 

so say you have your template here in excel as below:

 

1. Step no. copy and paste this in an email as below in your normal outlook like below and send it to yourself

Mira_Ghaly_1-1599630583377.png

2. Open the Received email , Click on Actions-> Other Actions ->View Source, this will render the HTML

Mira_Ghaly_3-1599630705374.png

3. Now you have to extract the Repeating part in your table, so now you will have to retrieve the repeating data and concatenate to it the repeating part.

So say this is the full html

 

<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri",sans-serif;}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:"Calibri",sans-serif;
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-family:"Calibri",sans-serif;}
@page WordSection1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="279" style="width:209.0pt;border-collapse:collapse">
<tbody>
<tr style="height:.2in">
<td width="136" nowrap="" valign="bottom" style="width:102.0pt;padding:0in 5.4pt 0in 5.4pt;height:.2in">
<p class="MsoNormal"><span style="color:black">Title :<o:p></o:p></span></p>
</td>
<td width="143" nowrap="" valign="bottom" style="width:107.0pt;padding:0in 5.4pt 0in 5.4pt;height:.2in">
</td>
</tr>
<tr style="height:.2in">
<td width="136" nowrap="" valign="bottom" style="width:102.0pt;border-top:none;border-left:none;border-bottom:solid white 1.5pt;border-right:solid white 1.0pt;background:#4472C4;padding:0in 5.4pt 0in 5.4pt;height:.2in">
<p class="MsoNormal"><b><span style="color:white">Name<o:p></o:p></span></b></p>
</td>
<td width="143" nowrap="" valign="bottom" style="width:107.0pt;border:none;border-bottom:solid white 1.5pt;background:#4472C4;padding:0in 5.4pt 0in 5.4pt;height:.2in">
<p class="MsoNormal"><b><span style="color:white">Positions<o:p></o:p></span></b></p>
</td>
</tr>
<tr style="height:.2in">
<td width="136" nowrap="" valign="bottom" style="width:102.0pt;border-top:none;border-left:none;border-bottom:solid white 1.0pt;border-right:solid white 1.0pt;background:#B4C6E7;padding:0in 5.4pt 0in 5.4pt;height:.2in">
</td>
<td width="143" nowrap="" valign="bottom" style="width:107.0pt;border:none;border-bottom:solid white 1.0pt;background:#B4C6E7;padding:0in 5.4pt 0in 5.4pt;height:.2in">
</td>
</tr>
<tr style="height:.2in">
<td width="136" nowrap="" valign="bottom" style="width:102.0pt;border-top:none;border-left:none;border-bottom:solid white 1.0pt;border-right:solid white 1.0pt;background:#D9E1F2;padding:0in 5.4pt 0in 5.4pt;height:.2in">
</td>
<td width="143" nowrap="" valign="bottom" style="width:107.0pt;border:none;border-bottom:solid white 1.0pt;background:#D9E1F2;padding:0in 5.4pt 0in 5.4pt;height:.2in">
</td>
</tr>
<tr style="height:.2in">
<td width="136" nowrap="" valign="bottom" style="width:102.0pt;border-top:none;border-left:none;border-bottom:solid white 1.0pt;border-right:solid white 1.0pt;background:#B4C6E7;padding:0in 5.4pt 0in 5.4pt;height:.2in">
</td>
<td width="143" nowrap="" valign="bottom" style="width:107.0pt;border:none;border-bottom:solid white 1.0pt;background:#B4C6E7;padding:0in 5.4pt 0in 5.4pt;height:.2in">
</td>
</tr>
<tr style="height:.2in">
<td width="136" nowrap="" valign="bottom" style="width:102.0pt;border-top:none;border-left:none;border-bottom:solid white 1.0pt;border-right:solid white 1.0pt;background:#D9E1F2;padding:0in 5.4pt 0in 5.4pt;height:.2in">
</td>
<td width="143" nowrap="" valign="bottom" style="width:107.0pt;border:none;border-bottom:solid white 1.0pt;background:#D9E1F2;padding:0in 5.4pt 0in 5.4pt;height:.2in">
</td>
</tr>
<tr style="height:.2in">
<td width="136" nowrap="" valign="bottom" style="width:102.0pt;border-top:none;border-left:none;border-bottom:solid white 1.0pt;border-right:solid white 1.0pt;background:#B4C6E7;padding:0in 5.4pt 0in 5.4pt;height:.2in">
</td>
<td width="143" nowrap="" valign="bottom" style="width:107.0pt;border:none;border-bottom:solid white 1.0pt;background:#B4C6E7;padding:0in 5.4pt 0in 5.4pt;height:.2in">
</td>
</tr>
<tr style="height:.2in">
<td width="136" nowrap="" valign="bottom" style="width:102.0pt;border-top:none;border-left:none;border-bottom:solid white 1.0pt;border-right:solid white 1.0pt;background:#D9E1F2;padding:0in 5.4pt 0in 5.4pt;height:.2in">
</td>
<td width="143" nowrap="" valign="bottom" style="width:107.0pt;border:none;border-bottom:solid white 1.0pt;background:#D9E1F2;padding:0in 5.4pt 0in 5.4pt;height:.2in">
</td>
</tr>
<tr style="height:.2in">
<td width="136" nowrap="" valign="bottom" style="width:102.0pt;border-top:none;border-left:none;border-bottom:solid white 1.0pt;border-right:solid white 1.0pt;background:#B4C6E7;padding:0in 5.4pt 0in 5.4pt;height:.2in">
</td>
<td width="143" nowrap="" valign="bottom" style="width:107.0pt;border:none;border-bottom:solid white 1.0pt;background:#B4C6E7;padding:0in 5.4pt 0in 5.4pt;height:.2in">
</td>
</tr>
<tr style="height:.2in">
<td width="136" nowrap="" valign="bottom" style="width:102.0pt;border:none;border-right:solid white 1.0pt;background:#D9E1F2;padding:0in 5.4pt 0in 5.4pt;height:.2in">
</td>
<td width="143" nowrap="" valign="bottom" style="width:107.0pt;border:none;background:#D9E1F2;padding:0in 5.4pt 0in 5.4pt;height:.2in">
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
</body>
</html>

 

 

So the Repeating TR is as below:

<tr style="height:.2in">
<td width="136" nowrap="" valign="bottom" style="width:102.0pt;border-top:none;border-left:none;border-bottom:solid white 1.0pt;border-right:solid white 1.0pt;background:#B4C6E7;padding:0in 5.4pt 0in 5.4pt;height:.2in">
</td>
<td width="143" nowrap="" valign="bottom" style="width:107.0pt;border:none;border-bottom:solid white 1.0pt;background:#B4C6E7;padding:0in 5.4pt 0in 5.4pt;height:.2in">
</td>
</tr>

 

So you will need to loop on your raw data and construct the Repeating part and save it in a variable

4. In your Email you have to Do like Concatenation to the HTML instead of Copy and Paste

So for your HTML you have to concatenate as concat(FirstStaticPart,variables(Repeating Part), EndStaticPart) and pass this composed action to your email.

 

This is a very complicated approach but it will work ; so it will be easier if you used word templates.

 

 

 

 

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

View solution in original post

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Users online (2,391)