web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Customised Email Template
Power Automate
Answered

Customised Email Template

(0) ShareShare
ReportReport
Posted on by

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! 

Categories:
I have the same question (0)
  • Mira Ghaly Profile Picture
    11,413 Moderator on at

    @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.

     

     

  • Community Power Platform Member Profile Picture
    on at

    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.

  • Verified answer
    Mira Ghaly Profile Picture
    11,413 Moderator on at

     

    <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.

     

     

     

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard