cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

HTML to text - fails

I have a flow which works successfully for most emails where we create a case in Dynamics from the email.

During this process we convert the HTML to text using the native Content conversion step.

 

For some I have received the following error:

{"Message":"TypeError: nextPrefixCallback(...).trimStart is not a function\n at D:\\home\\site\\wwwroot\\node_modules\\html-to-text\\lib\\formatter.js:218:32\n at Array.map (<anonymous>)\n at formatList (D:\\home\\site\\wwwroot\\node_modules\\html-to-text\\lib\\formatter.js:213:6)\n at formatUnorderedList (D:\\home\\site\\wwwroot\\node_modules\\html-to-text\\lib\\formatter.js:249:10)\n at recursiveWalk (D:\\home\\site\\wwwroot\\node_modules\\html-to-text\\lib\\html-to-text.js:267:9)\n at D:\\home\\site\\wwwroot\\node_modules\\html-to-text\\lib\\helper.js:62:40\n at formatInline (D:\\home\\site\\wwwroot\\node_modules\\html-to-text\\lib\\formatter.js:24:3)\n at recursiveWalk (D:\\home\\site\\wwwroot\\node_modules\\html-to-text\\lib\\html-to-text.js:267:9)\n at D:\\home\\site\\wwwroot\\node_modules\\html-to-text\\lib\\helper.js:62:40\n at formatList (D:\\home\\site\\wwwroot\\node_modules\\html-to-text\\lib\\formatter.js:233:5)"}

 

Any idea why it fails?

Here is one of the HTML's that failed:

<p><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta content="text/html; charset=iso-8859-1"></head><body style="font-size:10pt; font-family:Verdana,Geneva,sans-serif"><p style="line-height:12.0pt; background:#FFEB9C"><b><span lang="EN-US" style="font-size:10.0pt; color:#9C6500">CAUTION:</span></b><span lang="EN-US" style="font-size:10.0pt; color:black"> This email originated from outside of ALS. Do not click links or open attachments unless you recognize the sender and are sure content is relevant to you.</span></p><div><p>Hej! Jag undrar varför jag inte fått resultat på de här asfaltproverna?</p><p>Mvh Elisabeth</p><p id="reply-intro">2021-04-13 14:53 skrev info.ta@alsglobal.com:</p><blockquote type="cite" style="padding:0 0.4em; border-left:#1010ff 2px solid; margin:0"><div id="replybody1"><style type="text/css">
<!--
#replybody1 #v1outlook a
{padding:0}
#replybody1
{width:100%!important}
#replybody1 .v1ReadMsgBody
{width:100%}
#replybody1 .v1ExternalClass
{width:100%}
#replybody1
{}
#replybody1
{margin:0;
padding:0}
#replybody1 img
{border:0;
height:auto;
line-height:100%;
outline:none;
text-decoration:none}
#replybody1 table td
{border-collapse:collapse}
#replybody1 #v1backgroundTable
{height:100%!important;
margin:0;
padding:0;
width:100%!important}
#replybody1, #replybody1 #v1backgroundTable
{background-color:#F8F8F8}
#replybody1 #v1templateContainer
{border:1px solid #DDDDDD}
#replybody1 h1, #replybody1 .v1h1
{color:#202020;
display:block;
font-family:Arial;
font-size:30px;
font-weight:bold;
line-height:100%;
margin-top:0;
margin-right:0;
margin-bottom:10px;
margin-left:0;
text-align:left}
#replybody1 h2, #replybody1 .v1h2
{color:#202020;
display:block;
font-family:Arial;
font-size:26px;
font-weight:bold;
line-height:100%;
margin-top:0;
margin-right:0;
margin-bottom:10px;
margin-left:0;
text-align:left}
#replybody1 h3, #replybody1 .v1h3
{color:#202020;
display:block;
font-family:Arial;
font-size:22px;
font-weight:bold;
line-height:100%;
margin-top:0;
margin-right:0;
margin-bottom:10px;
margin-left:0;
text-align:left}
#replybody1 h4, #replybody1 .v1h4
{color:#202020;
display:block;
font-family:Arial;
font-size:18px;
font-weight:bold;
line-height:100%;
margin-top:0;
margin-right:0;
margin-bottom:10px;
margin-left:0;
text-align:left}
#replybody1 #v1templateHeader
{background-color:#FFFFFF;
border-bottom:0}
#replybody1 .v1headerContent
{color:#202020;
font-family:Arial;
font-size:34px;
font-weight:bold;
line-height:100%;
padding:20px;
text-align:left;
vertical-align:middle}
#replybody1 .v1headerContent a:link, #replybody1 .v1headerContent a:visited, #replybody1 .v1headerContent a .v1yshortcuts
{color:#005387;
font-weight:normal;
text-decoration:underline}
#replybody1 #v1headerImage
{height:auto;
max-width:600px!important}
#replybody1 #v1templateContainer, #replybody1 .v1bodyContent
{background-color:#FFFFFF}
#replybody1 .v1bodyContent div
{color:#202020;
font-family:Arial;
font-size:14px;
line-height:110%;
text-align:left}
#replybody1 .v1bodyContent div a:link, #replybody1 .v1bodyContent div a:visited, #replybody1 .v1bodyContent div a .v1yshortcuts
{color:#005387;
font-weight:normal;
text-decoration:underline}
#replybody1 .v1bodyContent img
{display:inline;
height:auto}
#replybody1 #v1templateFooter
{background-color:#FFFFFF;
border-top:0}
#replybody1 .v1footerContent div
{color:#005387;
font-family:Arial;
font-size:12px;
line-height:125%;
text-align:center}
#replybody1 .v1footerContent div a:link, #replybody1 .v1footerContent div a:visited, #replybody1 .v1footerContent div a .v1yshortcuts
{color:#005387;
font-weight:normal;
text-decoration:underline}
#replybody1 .v1footerContent img
{display:inline}
#replybody1 .v1bodyContent table.v1dataTable
{width:100%}
#replybody1 .v1bodyContent table.v1dataTable tbody td, #replybody1 .v1bodyContent table.v1dataTable thead th
{border-collapse:collapse;
border:1px solid;
padding:6px;
color:#202020;
font-family:Arial;
font-size:12px}
#replybody1 .v1bodyContent table.v1dataTable thead th
{background-color:darkgray}
-->
</style><div><center><table id="v1backgroundTable" border="0" width="100%" cellspacing="0" cellpadding="0"><tbody><tr><td align="center" valign="top"><table id="v1templateContainer" border="0" width="600" cellspacing="0" cellpadding="0"><tbody><tr><td align="center" valign="top"><table id="v1templateHeader" border="0" width="600" cellspacing="0" cellpadding="0"><tbody><tr><td class="v1headerContent"><img src="cid:161850044960785b61ee6b1910542614@eamiljoprovtagning.se" data-attachment-id="4719ac37-779a-4a50-a9bb-121d40dffa06" ></td></tr></tbody></table></td></tr><tr><td align="center" valign="top"><table id="v1templateBody" border="0" width="600" cellspacing="0" cellpadding="0"><tbody><tr><td class="v1bodyContent" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="20"><tbody><tr><td valign="top"><div><h1>Orderinformation för ALS Workorder ST2108663</h1><h3>Projekt: 11201011</h3><h3>&nbsp;</h3><p>Hej Elisabeth Andersson,</p><p>Bifogade är följande filer för din beställning <strong>ST2108663</strong>:</p><ul><li>ST2108663_0_SE_SRN_2_A4_ENV_210413145318_sv-SE.pdf</li></ul><br><p style="display:block">Rapportmottagare</p><ul><li><small>Elisabeth Andersson</small> <ul><li><span style="font-size:smaller">ST2108663_0_SE_SRN_2_A4_ENV_210413145318_sv-SE.pdf&nbsp;<span style="font-size:smaller">(Email)</span></span></li></ul></li><li><small>Jörgen Forslund</small> <ul><li><span style="font-size:smaller">ST2108663_0_SE_SRN_2_A4_ENV_210413145318_sv-SE&nbsp;<span style="font-size:smaller"></span></span></li></ul></li></ul></div></td></tr></tbody></table></td></tr></tbody></table></td></tr><tr><td align="center" valign="top"><table id="v1templateFooter" border="0" width="600" cellspacing="0" cellpadding="10"><tbody><tr><td class="v1footerContent" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="10"><tbody><tr><td valign="top"><div><a href="https://aus01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.alsglobal.com%2F&amp;data=04%7C..." originalsrc="http://www.alsglobal.com/" shash="QrB4TNGG3E6Wqs++cjK2+y3eltXrtnX5m5Y9tF+OgygpKp4OzyICLoMakZM6ERxHK51kMWaj3x023ajNby+rQjXgryOvBcPmaJ3w6dnJCiNWjTlfHPGnFh06KBFOj0jmonqb6ZTiJrkbOteMWng1EGdZYuDfmq7XSRlSQi1SIkU=" target="_blank" rel="noopener noreferrer">www.alsglobal.com</a></div></td></tr><tr><td valign="top"><div><hr style="height:4px; color:#005387; width:100%"></div><div><span style="color:#005387; font-family:'Times New Roman'; font-size:small">R&nbsp;I&nbsp;G&nbsp;H&nbsp;T&nbsp;&nbsp;&nbsp;S&nbsp;O&nbsp;L&nbsp;U&nbsp;T&nbsp;I&nbsp;O&nbsp;N&nbsp;S&nbsp;&nbsp;&nbsp;</span> <strong><span style="color:#f8d744; font-family:'Times New Roman'; font-size:large">|</span></strong> <span style="color:#005387; font-family:'Times New Roman'; font-size:small">&nbsp;&nbsp;&nbsp;R&nbsp;I&nbsp;G&nbsp;H&nbsp;T&nbsp;&nbsp;&nbsp;P&nbsp;A&nbsp;R&nbsp;T&nbsp;N&nbsp;E&nbsp;R</span></div></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table></center></div></div></blockquote></div></body></html></p>

 

2 ACCEPTED SOLUTIONS

Accepted Solutions

I tried this on my side, and received the same error. It is clear from the error message produced that it is the  lists in the HTML that are causing it to crash:

D:\\home\\site\\wwwroot\\node_modules\\html-to-text\\lib\\helper.js:62:40\n at formatList

The HTML you are providing does indeed contain lists:

2021-04-19_11-03-20.png

So I used an expression to replace the HTML values <ul> </ul> <li> and </li> like this:

 

replace(
  replace(
	  replace(
	    replace(outputs('HTML'), '<ul>', ''), 
		'</ul>', ''
	  ),
	'<li>', ''), 
'</li>', '')

 

I used this in the HTML to Text action and then it works normally:

2021-04-19_11-11-40.png

I've replaced these values with nothing, but you might want to choose something else, like a line break etc. It then produces the output no problem. Seems like a bug to me.

View solution in original post

replace(
	replace(
		replace(
		  replace(
			  replace(
				replace(outputs('HTML'), '<ul>', '<br>'), 
				'</ul>', '<br>'
			  ),
			'<li>', '<br>'), 
		'</li>', '<br>'),
	'<ul type="circle">', ''),
'<li class="MsoNormal" style="color:#202020; line-height:110%">', '')

View solution in original post

12 REPLIES 12
fchopo
Super User
Super User

Hello @colbournescott 

You should try to remove headers sections, stylesheets and other content that no sense to be converted to text. In order to replace those values you could use the replace function, for instance.

Have a look at this video to get some ideas: Extract and parse data from an email - Power Platform Community (microsoft.com)

Hope it helps!

Ferran

Did I answer your question? Please consider to mark my post as a solution to help others.
Proud to be a Flownaut!

I tried this on my side, and received the same error. It is clear from the error message produced that it is the  lists in the HTML that are causing it to crash:

D:\\home\\site\\wwwroot\\node_modules\\html-to-text\\lib\\helper.js:62:40\n at formatList

The HTML you are providing does indeed contain lists:

2021-04-19_11-03-20.png

So I used an expression to replace the HTML values <ul> </ul> <li> and </li> like this:

 

replace(
  replace(
	  replace(
	    replace(outputs('HTML'), '<ul>', ''), 
		'</ul>', ''
	  ),
	'<li>', ''), 
'</li>', '')

 

I used this in the HTML to Text action and then it works normally:

2021-04-19_11-11-40.png

I've replaced these values with nothing, but you might want to choose something else, like a line break etc. It then produces the output no problem. Seems like a bug to me.

Awesome - thank you very much.  Worked like a charm.  
I am not an expert in html so left it blank as you did.  If I wanted to add in line breaks instead, would it look like this?

replace(
  replace(
	  replace(
	    replace(outputs('HTML'), '<ul>', '<br>'), 
		'</ul>', '<br>'
	  ),
	'<li>', '<br>'), 
'</li>', '<br>')

Yep.

askondo
Community Support
Community Support

@Paulie78 @fchopo Thank you very much for all your answers to the forum.

@Paulie78 - Sorry but another one failed.  It looks like it is in a different format.  Is there something similar I can do with this?

<p><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta content="text/html; charset=iso-8859-1"><meta name="Generator" content="Microsoft Word 15 (filtered medium)"><style>
<!--
@font-face
{font-family:Wingdings}
@font-face
{font-family:"Cambria Math"}
@font-face
{font-family:Calibri}
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman",serif}
h1
{margin-top:0cm;
margin-right:0cm;
margin-bottom:7.5pt;
margin-left:0cm;
font-size:22.5pt;
font-family:"Arial",sans-serif;
color:#202020;
font-weight:bold}
h2
{margin-top:0cm;
margin-right:0cm;
margin-bottom:7.5pt;
margin-left:0cm;
font-size:19.5pt;
font-family:"Arial",sans-serif;
color:#202020;
font-weight:bold}
h3
{margin-top:0cm;
margin-right:0cm;
margin-bottom:7.5pt;
margin-left:0cm;
font-size:16.5pt;
font-family:"Arial",sans-serif;
color:#202020;
font-weight:bold}
h4
{margin-top:0cm;
margin-right:0cm;
margin-bottom:7.5pt;
margin-left:0cm;
font-size:13.5pt;
font-family:"Arial",sans-serif;
color:#202020;
font-weight:bold}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline}
p
{margin-right:0cm;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman",serif}
span.Rubrik1Char
{font-family:"Calibri Light",sans-serif;
color:#2E74B5}
span.Rubrik2Char
{font-family:"Calibri Light",sans-serif;
color:#2E74B5}
span.Rubrik3Char
{font-family:"Calibri Light",sans-serif;
color:#1F4D78}
span.Rubrik4Char
{font-family:"Calibri Light",sans-serif;
color:#2E74B5;
font-style:italic}
p.msonormal0, li.msonormal0, div.msonormal0
{margin-right:0cm;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman",serif}
p.readmsgbody, li.readmsgbody, div.readmsgbody
{margin-right:0cm;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman",serif}
p.externalclass, li.externalclass, div.externalclass
{margin-right:0cm;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman",serif}
p.h1, li.h1, div.h1
{margin-top:0cm;
margin-right:0cm;
margin-bottom:7.5pt;
margin-left:0cm;
font-size:22.5pt;
font-family:"Arial",sans-serif;
color:#202020;
font-weight:bold}
p.h2, li.h2, div.h2
{margin-top:0cm;
margin-right:0cm;
margin-bottom:7.5pt;
margin-left:0cm;
font-size:19.5pt;
font-family:"Arial",sans-serif;
color:#202020;
font-weight:bold}
p.h3, li.h3, div.h3
{margin-top:0cm;
margin-right:0cm;
margin-bottom:7.5pt;
margin-left:0cm;
font-size:16.5pt;
font-family:"Arial",sans-serif;
color:#202020;
font-weight:bold}
p.h4, li.h4, div.h4
{margin-top:0cm;
margin-right:0cm;
margin-bottom:7.5pt;
margin-left:0cm;
font-size:13.5pt;
font-family:"Arial",sans-serif;
color:#202020;
font-weight:bold}
p.headercontent, li.headercontent, div.headercontent
{margin-right:0cm;
margin-left:0cm;
font-size:25.5pt;
font-family:"Arial",sans-serif;
color:#202020;
font-weight:bold}
p.bodycontent, li.bodycontent, div.bodycontent
{margin-right:0cm;
margin-left:0cm;
background:white;
font-size:12.0pt;
font-family:"Times New Roman",serif}
p.yshortcuts, li.yshortcuts, div.yshortcuts
{margin-right:0cm;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman",serif}
p.yshortcuts1, li.yshortcuts1, div.yshortcuts1
{margin-right:0cm;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman",serif;
color:#005387;
text-decoration:underline}
p.yshortcuts2, li.yshortcuts2, div.yshortcuts2
{margin-right:0cm;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman",serif;
color:#005387;
text-decoration:underline}
p.yshortcuts3, li.yshortcuts3, div.yshortcuts3
{margin-right:0cm;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman",serif;
color:#005387;
text-decoration:underline}
span.E-postmall35
{font-family:"Arial",sans-serif;
color:#44546A;
font-weight:normal;
font-style:normal}
.MsoChpDefault
{font-size:10.0pt}
@page WordSection1
{margin:70.85pt 70.85pt 70.85pt 70.85pt}
div.WordSection1
{}
ol
{margin-bottom:0cm}
ul
{margin-bottom:0cm}
-->
</style></head><body bgcolor="#F8F8F8" lang="SV" link="blue" vlink="purple"><p style="line-height:12.0pt; background:#FFEB9C"><b><span lang="EN-US" style="font-size:10.0pt; color:#9C6500">CAUTION:</span></b><span lang="EN-US" style="font-size:10.0pt; color:black"> This email originated from outside of ALS. Do not click links or open attachments unless you recognize the sender and are sure content is relevant to you.</span></p><div><div class="WordSection1"><p class="MsoNormal"><span style="font-size:11.0pt; font-family:&quot;Arial&quot;,sans-serif; color:#44546A">Hej,</span></p><p class="MsoNormal"><span style="font-size:11.0pt; font-family:&quot;Arial&quot;,sans-serif; color:#44546A">&nbsp;</span></p><p class="MsoNormal"><span style="font-size:11.0pt; font-family:&quot;Arial&quot;,sans-serif; color:#44546A">Finns dessa filter sparade så att det går att beställa analys av grundämnen?</span></p><p class="MsoNormal"><span style="font-size:11.0pt; font-family:&quot;Arial&quot;,sans-serif; color:#44546A">&nbsp;</span></p><p class="MsoNormal"><span style="font-size:11.0pt; font-family:&quot;Arial&quot;,sans-serif; color:#44546A">I så fall skulle jag vilja beställa analys av grundämnen i inhalerbart damm för filter IOM 895 och grundämnen i respirabelt damm för filter SKC 2694.</span></p><p class="MsoNormal"><span style="font-size:11.0pt; font-family:&quot;Arial&quot;,sans-serif; color:#44546A">&nbsp;</span></p><p class="MsoNormal"><span style="font-size:11.0pt; font-family:&quot;Arial&quot;,sans-serif; color:#44546A">&nbsp;</span></p><p class="MsoNormal"><span style="font-size:8.0pt; font-family:&quot;Arial&quot;,sans-serif; color:gray">Med vänlig hälsning</span></p><p class="MsoNormal"><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,sans-serif; color:#44546A">&nbsp;</span><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,sans-serif; color:#44546A"></span></p><p class="MsoNormal"><b><span style="font-size:9.0pt; font-family:&quot;Arial&quot;,sans-serif; color:gray">Gun-Britt Berglund</span></b><span style="font-size:9.0pt; font-family:&quot;Arial&quot;,sans-serif; color:gray"></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:8.0pt; font-family:&quot;Arial&quot;,sans-serif; color:gray">Arbetsmiljöingenjör</span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt; font-family:&quot;Arial&quot;,sans-serif; color:gray">&nbsp;</span></p><p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt; font-family:&quot;Arial&quot;,sans-serif; color:red">AB Previa</span></b></p><p class="MsoNormal"><span lang="EN-US" style="font-size:8.0pt; font-family:&quot;Arial&quot;,sans-serif; color:gray">A Falck Group Company</span></p><p class="MsoNormal"><span style="font-size:8.0pt; font-family:&quot;Arial&quot;,sans-serif; color:gray">Besöksadress: Isafjordsgatan 22 / Kistagången 16, Kista</span><span style="font-size:8.0pt; color:#44546A"></span></p><p class="MsoNormal"><span style="font-size:8.0pt; font-family:&quot;Arial&quot;,sans-serif; color:gray">Box 1094, 164 25 Kista</span><span style="font-size:8.0pt; font-family:&quot;Calibri&quot;,sans-serif; color:#44546A"> </span><span style="font-size:8.0pt; color:#44546A"></span></p><p class="MsoNormal"><span style="font-size:8.0pt; font-family:&quot;Arial&quot;,sans-serif; color:gray">Direkt 08-752 5514</span><span style="font-size:8.0pt; font-family:&quot;Calibri&quot;,sans-serif; color:#44546A"> </span><span style="font-size:8.0pt; color:#44546A"></span></p><p class="MsoNormal"><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,sans-serif; color:#44546A"><a href="mailto:gun-britt.berglund@previa.se"><span style="font-size:8.0pt; font-family:&quot;Arial&quot;,sans-serif">gun-britt.berglund@previa.se</span></a></span><span style="font-size:8.0pt; font-family:&quot;Arial&quot;,sans-serif; color:#44546A"> </span><span style="font-size:8.0pt; font-family:&quot;Arial&quot;,sans-serif; color:gray"></span></p><p class="MsoNormal"><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,sans-serif; color:#44546A"><a href="https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Furldefense.proofpoint.com%2Fv2%2Fu..." originalsrc="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.previa.se_&amp;d=DwMFAw&amp;c=9mghv0deYPYDGP..." shash="smlmL64S5vibe7cWE64qJobjlcuXuLXNHIpNDLcewcbbyDnrfAyznILYgDdy74Ew9hv7/bAadMQy/jUiA2JQwQD5EcIr6BEWOel1fZ9z28BnDUTlUcJU2+2LkCLu1/cfCwaSgTCxeT4CuiWuBCRbmAa0vguC7Atx7iecOrpf6Bw="><span style="font-size:8.0pt; font-family:&quot;Arial&quot;,sans-serif">www.previa.se</span></a></span><span style="color:#44546A"></span></p><p class="MsoNormal"><u><span style="font-size:8.0pt; font-family:&quot;Arial&quot;,sans-serif; color:blue">facebook.com/abprevia</span></u></p><p class="MsoNormal"><u><span style="font-size:8.0pt; font-family:&quot;Arial&quot;,sans-serif; color:blue"><a href="https://aus01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.linkedin.com%2Fcompany%2Fab-pre..." originalsrc="http://www.linkedin.com/company/ab-previa" shash="zkZbYyUY2AqlQYNFhHr7UoF/a58qWKh3u0MdV1Hl2wmoXZm4jAwtkdzQMHmV+E5QbHOYVGKzJHN5/fhmr5r6NxEkPR1N9abE+opoNe/d1q6Dq9OxSGWyIEOi9au/lW4gzQsIOa0yg5jESBej/zDDTWlnmMLJnn9KfgRck3AnAWk=">www.linkedin.com/company/ab-previa</a></span></u></p><p class="MsoNormal"><span style="font-size:11.0pt; font-family:&quot;Arial&quot;,sans-serif; color:#44546A">&nbsp;</span></p><p class="MsoNormal"><span style="font-size:11.0pt; font-family:&quot;Arial&quot;,sans-serif; color:#44546A">&nbsp;</span></p><p class="MsoNormal"><span style="font-size:11.0pt; font-family:&quot;Arial&quot;,sans-serif; color:#44546A">&nbsp;</span></p><div><div style="border:none; border-top:solid #E1E1E1 1.0pt; padding:3.0pt 0cm 0cm 0cm"><p class="MsoNormal"><b><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,sans-serif">Från:</span></b><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,sans-serif"> info.ta@alsglobal.com &lt;info.ta@alsglobal.com&gt; <br><b>Skickat:</b> den 1 april 2021 12:08<br><b>Till:</b> Gun-Britt Berglund &lt;Gun-Britt.Berglund@previa.se&gt;<br><b>Ämne:</b> Resultat &amp; Dataöverföring filer för ALS Arbetsorder: ST2106255 | Er referens: Ragn-Sells, Högbytorp </span></p></div></div><p class="MsoNormal">&nbsp;</p><div align="center"><table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100.0%; background:#F8F8F8; border-collapse:collapse"><tbody><tr><td valign="top" style="padding:0cm 0cm 0cm 0cm"><div align="center"><table class="MsoNormalTable" border="1" cellspacing="0" cellpadding="0" width="0" style="width:450.0pt; background:white; border-collapse:collapse; border:none"><tbody><tr><td valign="top" style="border:solid #DDDDDD 1.0pt; border-bottom:none; padding:0cm 0cm 0cm 0cm"><div align="center"><table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="0" style="width:450.0pt; background:white; border-collapse:collapse"><tbody><tr><td style="padding:15.0pt 15.0pt 15.0pt 15.0pt"><p class="MsoNormal"><b><span style="font-size:25.5pt; font-family:&quot;Arial&quot;,sans-serif; color:#202020"><img border="0" width="62" height="60" id="_x0000_i1025" src="cid:image001.png@01D73536.680C6D70" style="width:.65in; height:.625in" data-attachment-id="f2259616-bd70-4bbd-a719-37a111e649e3" ></span></b></p></td></tr></tbody></table></div></td></tr><tr><td valign="top" style="border-top:none; border-left:solid #DDDDDD 1.0pt; border-bottom:none; border-right:solid #DDDDDD 1.0pt; padding:0cm 0cm 0cm 0cm"><div align="center"><table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="0" id="templateBody" style="width:450.0pt; border-collapse:collapse"><tbody><tr><td valign="top" style="background:white; padding:0cm 0cm 0cm 0cm"><table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100.0%; border-collapse:collapse"><tbody><tr><td valign="top" style="padding:12.0pt 12.0pt 12.0pt 12.0pt"><h1>Orderinformation för ALS Workorder ST2106255</h1><h3>Projekt: Ragn-Sells, Högbytorp</h3><p style="line-height:110%"><span style="font-size:10.5pt; line-height:110%; font-family:&quot;Arial&quot;,sans-serif; color:#202020">Hej Gun-Britt Berglund, </span></p><p style="line-height:110%"><span style="font-size:10.5pt; line-height:110%; font-family:&quot;Arial&quot;,sans-serif; color:#202020">Bifogade är följande filer för din beställning <b>ST2106255</b>:</span></p><ul type="disc"><li class="MsoNormal" style="color:#202020; line-height:110%"><span style="font-size:10.5pt; line-height:110%; font-family:&quot;Arial&quot;,sans-serif">ST2106255_0_COA_Standard_sv-SE.pdf</span><li class="MsoNormal" style="color:#202020; line-height:110%"><span style="font-size:10.5pt; line-height:110%; font-family:&quot;Arial&quot;,sans-serif">EDD_XLS_STD_ST2106255_0_sv-SE.xlsx</span><li class="MsoNormal" style="color:#202020; line-height:110%"><span style="font-size:10.5pt; line-height:110%; font-family:&quot;Arial&quot;,sans-serif">ST2106255_COC_202103181557.pdf</span><li class="MsoNormal" style="color:#202020; line-height:110%"><span style="font-size:10.5pt; line-height:110%; font-family:&quot;Arial&quot;,sans-serif">ST2106255_COC_202103231526.pdf</span><p class="MsoNormal" style="line-height:110%"><span style="font-size:10.5pt; line-height:110%; font-family:&quot;Arial&quot;,sans-serif; color:#202020">&nbsp;</span></p><p style="line-height:110%"><span style="font-size:10.5pt; line-height:110%; font-family:&quot;Arial&quot;,sans-serif; color:#202020">Rapportmottagare</span></p><ul type="disc"><li class="MsoNormal" style="color:#202020; line-height:110%"><span style="font-size:7.5pt; line-height:110%; font-family:&quot;Arial&quot;,sans-serif">Gun-Britt Berglund</span><span style="font-size:10.5pt; line-height:110%; font-family:&quot;Arial&quot;,sans-serif"> </span><ul type="circle"><li class="MsoNormal" style="color:#202020; line-height:110%"><span style="font-size:7.5pt; line-height:110%; font-family:&quot;Arial&quot;,sans-serif">ST2106255_0_COA_Standard_sv-SE.pdf&nbsp;(Email)</span><span style="font-size:10.5pt; line-height:110%; font-family:&quot;Arial&quot;,sans-serif"></span><li class="MsoNormal" style="color:#202020; line-height:110%"><span style="font-size:7.5pt; line-height:110%; font-family:&quot;Arial&quot;,sans-serif">EDD_XLS_STD_ST2106255_0_sv-SE.xlsx&nbsp;</span><span style="font-size:10.5pt; line-height:110%; font-family:&quot;Arial&quot;,sans-serif"></span><li class="MsoNormal" style="color:#202020; line-height:110%"><span style="font-size:7.5pt; line-height:110%; font-family:&quot;Arial&quot;,sans-serif">ST2106255_COC_202103181557.pdf&nbsp;(Email)</span><span style="font-size:10.5pt; line-height:110%; font-family:&quot;Arial&quot;,sans-serif"></span><li class="MsoNormal" style="color:#202020; line-height:110%"><span style="font-size:7.5pt; line-height:110%; font-family:&quot;Arial&quot;,sans-serif">ST2106255_COC_202103231526.pdf&nbsp;(Email)</span><span style="font-size:10.5pt; line-height:110%; font-family:&quot;Arial&quot;,sans-serif"></span></td></tr></tbody></table></td></tr></tbody></table></div></td></tr><tr><td valign="top" style="border:solid #DDDDDD 1.0pt; border-top:none; padding:0cm 0cm 0cm 0cm"><div align="center"><table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="0" id="templateFooter" style="width:450.0pt; background:white; border-collapse:collapse"><tbody><tr><td valign="top" style="padding:6.0pt 6.0pt 6.0pt 6.0pt"><table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100.0%; border-collapse:collapse"><tbody><tr><td valign="top" style="padding:6.0pt 6.0pt 6.0pt 6.0pt"><p class="MsoNormal" align="center" style="text-align:center; line-height:125%"><span style="font-size:9.0pt; line-height:125%; font-family:&quot;Arial&quot;,sans-serif; color:#005387"><a href="https://aus01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.alsglobal.com%2F&amp;data=04%7C..." originalsrc="http://www.alsglobal.com/" shash="XjziGVU9jGlgay7rbgvE31uiYNEGiRzTsVPTLNkY1sYBjVGh2aUPUVt4f31Dg+eabrN2A9wdt2hqf0ZV0cwdJgKDFkrvxlXeezL8ISrh2oD3RleyuDDn6LBW4IZ9O2f/CCW7zUmUIWpV3jgPYqwuWcWvgAuuYoDGNlnYr1EkHE4="><span style="color:#005387">www.alsglobal.com</span></a></span></p></td></tr><tr><td valign="top" style="padding:6.0pt 6.0pt 6.0pt 6.0pt"><div class="MsoNormal" align="center" style="text-align:center; line-height:125%"><span style="font-size:9.0pt; line-height:125%; font-family:&quot;Arial&quot;,sans-serif; color:#005387"><hr size="5" width="100%" noshade="" align="center" style="color:#005387"></span></div><p class="MsoNormal" align="center" style="text-align:center; line-height:125%"><span style="font-size:10.0pt; line-height:125%; color:#005387">R&nbsp;I&nbsp;G&nbsp;H&nbsp;T&nbsp;&nbsp;&nbsp;S&nbsp;O&nbsp;L&nbsp;U&nbsp;T&nbsp;I&nbsp;O&nbsp;N&nbsp;S&nbsp;&nbsp;&nbsp;</span><span style="font-size:9.0pt; line-height:125%; font-family:&quot;Arial&quot;,sans-serif; color:#005387"> </span><b><span style="font-size:13.5pt; line-height:125%; color:#F8D744">|</span></b><span style="font-size:9.0pt; line-height:125%; font-family:&quot;Arial&quot;,sans-serif; color:#005387"> </span><span style="font-size:10.0pt; line-height:125%; color:#005387">&nbsp;&nbsp;&nbsp;R&nbsp;I&nbsp;G&nbsp;H&nbsp;T&nbsp;&nbsp;&nbsp;P&nbsp;A&nbsp;R&nbsp;T&nbsp;N&nbsp;E&nbsp;R</span><span style="font-size:9.0pt; line-height:125%; font-family:&quot;Arial&quot;,sans-serif; color:#005387"> </span></p></td></tr></tbody></table></td></tr></tbody></table></div></td></tr></tbody></table></div></td></tr></tbody></table></div><p class="MsoNormal">&nbsp;</p></div></div></body></html></p>

replace(
	replace(
		replace(
		  replace(
			  replace(
				replace(outputs('HTML'), '<ul>', '<br>'), 
				'</ul>', '<br>'
			  ),
			'<li>', '<br>'), 
		'</li>', '<br>'),
	'<ul type="circle">', ''),
'<li class="MsoNormal" style="color:#202020; line-height:110%">', '')

Thank you again.  Awesome!

Hi, 

I get the same issue but I have a question, What should I put inside HTML? the body of the email? I am testing with the error I got.

SOL24_0-1618955866721.png

replace(
replace(
replace(
replace(outputs('TextBody'), '<ul>', ''),
'</ul>', ''
),
'<li>', ''),
'</li>', '')

 

SOL24_1-1618955904161.png

 

This is the error message of the original:

{"Message":"TypeError: nextPrefixCallback(...).trimStart is not a function\n at D:\\home\\site\\wwwroot\\node_modules\\html-to-text\\lib\\formatter.js:218:32\n at Array.map (<anonymous>)\n at formatList (D:\\home\\site\\wwwroot\\node_modules\\html-to-text\\lib\\formatter.js:213:6)\n at formatUnorderedList (D:\\home\\site\\wwwroot\\node_modules\\html-to-text\\lib\\formatter.js:249:10)\n at recursiveWalk (D:\\home\\site\\wwwroot\\node_modules\\html-to-text\\lib\\html-to-text.js:267:9)\n at D:\\home\\site\\wwwroot\\node_modules\\html-to-text\\lib\\helper.js:62:40\n at formatInline (D:\\home\\site\\wwwroot\\node_modules\\html-to-text\\lib\\formatter.js:24:3)\n at recursiveWalk (D:\\home\\site\\wwwroot\\node_modules\\html-to-text\\lib\\html-to-text.js:267:9)\n at D:\\home\\site\\wwwroot\\node_modules\\html-to-text\\lib\\helper.js:62:40\n at formatList (D:\\home\\site\\wwwroot\\node_modules\\html-to-text\\lib\\formatter.js:233:5)"}

 

 

Thanks for your help! 

Can help me please

@SOL24 I cannot, because in order to test it, I need your HTML. Paste it on to pastebin.com and I will see if I can make it work.

This is an error of the Content Conversion connector. Basically, the connector cannot handle nested lists (<ul> or <ol>).

 

I opened a support case and they mentioned there are just two support cases opened globally about this (mine is one of them). The product team now knows about the issue but it's a very but very low priority to fix this bug.

 

Helpful resources

Announcements

Community will be READ ONLY July 16th, 5p PDT -July 22nd

Dear Community Members,   We'd like to let you know of an upcoming change to the community platform: starting July 16th, the platform will transition to a READ ONLY mode until July 22nd.   During this period, members will not be able to Kudo, Comment, or Reply to any posts.   On July 22nd, please be on the lookout for a message sent to the email address registered on your community profile. This email is crucial as it will contain your unique code and link to register for the new platform encompassing all of the communities.   What to Expect in the New Community: A more unified experience where all products, including Power Apps, Power Automate, Copilot Studio, and Power Pages, will be accessible from one community.Community Blogs that you can syndicate and link to for automatic updates. We appreciate your understanding and cooperation during this transition. Stay tuned for the exciting new features and a seamless community experience ahead!

Summer of Solutions | Week 4 Results | Winners will be posted on July 24th

We are excited to announce the Summer of Solutions Challenge!    This challenge is kicking off on Monday, June 17th and will run for (4) weeks.  The challenge is open to all Power Platform (Power Apps, Power Automate, Copilot Studio & Power Pages) community members. We invite you to participate in a quest to provide solutions to as many questions as you can. Answers can be provided in all the communities.    Entry Period: This Challenge will consist of four weekly Entry Periods as follows (each an “Entry Period”)   - 12:00 a.m. PT on June 17, 2024 – 11:59 p.m. PT on June 23, 2024 - 12:00 a.m. PT on June 24, 2024 – 11:59 p.m. PT on June 30, 2024 - 12:00 a.m. PT on July 1, 2024 – 11:59 p.m. PT on July 7, 2024 - 12:00 a.m. PT on July 8, 2024 – 11:59 p.m. PT on July 14, 2024   Entries will be eligible for the Entry Period in which they are received and will not carryover to subsequent weekly entry periods.  You must enter into each weekly Entry Period separately.   How to Enter: We invite you to participate in a quest to provide "Accepted Solutions" to as many questions as you can. Answers can be provided in all the communities. Users must provide a solution which can be an “Accepted Solution” in the Forums in all of the communities and there are no limits to the number of “Accepted Solutions” that a member can provide for entries in this challenge, but each entry must be substantially unique and different.    Winner Selection and Prizes: At the end of each week, we will list the top ten (10) Community users which will consist of: 5 Community Members & 5 Super Users and they will advance to the final drawing. We will post each week in the News & Announcements the top 10 Solution providers.  At the end of the challenge, we will add all of the top 10 weekly names and enter them into a random drawing.  Then we will randomly select ten (10) winners (5 Community Members & 5 Super Users) from among all eligible entrants received across all weekly Entry Periods to receive the prize listed below. If a winner declines, we will draw again at random for the next winner.  A user will only be able to win once overall. If they are drawn multiple times, another user will be drawn at random.  Individuals will be contacted before the announcement with the opportunity to claim or deny the prize.  Once all of the winners have been notified, we will post in the News & Announcements of each community with the list of winners.   Each winner will receive one (1) Pass to the Power Platform Conference in Las Vegas, Sep. 18-20, 2024 ($1800 value). NOTE: Prize is for conference attendance only and any other costs such as airfare, lodging, transportation, and food are the sole responsibility of the winner. Tickets are not transferable to any other party or to next year’s event.   ** PLEASE SEE THE ATTACHED RULES for this CHALLENGE**   Week 1 Results: Congratulations to the Week 1 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge.   Community MembersNumber SolutionsSuper UsersNumber Solutions Deenuji 9 @NathanAlvares24  17 @Anil_g  7 @ManishSolanki  13 @eetuRobo  5 @David_MA  10 @VishnuReddy1997  5 @SpongYe  9JhonatanOB19932 (tie) @Nived_Nambiar  8 @maltie  2 (tie)   @PA-Noob  2 (tie)   @LukeMcG  2 (tie)   @tgut03  2 (tie)       Week 2 Results: Congratulations to the Week 2 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 2: Community MembersSolutionsSuper UsersSolutionsPower Automate  @Deenuji  12@ManishSolanki 19 @Anil_g  10 @NathanAlvares24  17 @VishnuReddy1997  6 @Expiscornovus  10 @Tjan  5 @Nived_Nambiar  10 @eetuRobo  3 @SudeepGhatakNZ 8     Week 3 Results: Congratulations to the Week 3 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 3:Community MembersSolutionsSuper UsersSolutionsPower Automate Deenuji32ManishSolanki55VishnuReddy199724NathanAlvares2444Anil_g22SudeepGhatakNZ40eetuRobo18Nived_Nambiar28Tjan8David_MA22   Week 4 Results: Congratulations to the Week 4 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 4:Community MembersSolutionsSuper UsersSolutionsPower Automate Deenuji11FLMike31Sayan11ManishSolanki16VishnuReddy199710creativeopinion14Akshansh-Sharma3SudeepGhatakNZ7claudiovc2CFernandes5 misc2Nived_Nambiar5 Usernametwice232rzaneti5 eetuRobo2   Anil_g2   SharonS2  

Check Out | 2024 Release Wave 2 Plans for Microsoft Dynamics 365 and Microsoft Power Platform

On July 16, 2024, we published the 2024 release wave 2 plans for Microsoft Dynamics 365 and Microsoft Power Platform. These plans are a compilation of the new capabilities planned to be released between October 2024 to March 2025. This release introduces a wealth of new features designed to enhance customer understanding and improve overall user experience, showcasing our dedication to driving digital transformation for our customers and partners.    The upcoming wave is centered around utilizing advanced AI and Microsoft Copilot technologies to enhance user productivity and streamline operations across diverse business applications. These enhancements include intelligent automation, AI-powered insights, and immersive user experiences that are designed to break down barriers between data, insights, and individuals. Watch a summary of the release highlights.    Discover the latest features that empower organizations to operate more efficiently and adaptively. From AI-driven sales insights and customer service enhancements to predictive analytics in supply chain management and autonomous financial processes, the new capabilities enable businesses to proactively address challenges and capitalize on opportunities.    

Updates to Transitions in the Power Platform Communities

We're embarking on a journey to enhance your experience by transitioning to a new community platform. Our team has been diligently working to create a fresh community site, leveraging the very Dynamics 365 and Power Platform tools our community advocates for.  We started this journey with transitioning Copilot Studio forums and blogs in June. The move marks the beginning of a new chapter, and we're eager for you to be a part of it. The rest of the Power Platform product sites will be moving over this summer.   Stay tuned for more updates as we get closer to the launch. We can't wait to welcome you to our new community space, designed with you in mind. Let's connect, learn, and grow together.   Here's to new beginnings and endless possibilities!   If you have any questions, observations or concerns throughout this process please go to https://aka.ms/PPCommSupport.   To stay up to date on the latest details of this migration and other important Community updates subscribe to our News and Announcements forums: Copilot Studio, Power Apps, Power Automate, Power Pages