power automate flow - html to text - odd new line

1.2k Views Asked by At

Im struggling with a mail html to text flow. It works fine normally, but all of a sudden it is inserting a "\n" that shouldnt be there and comparing the &nbsp to the other lines where it does not do this does not reveal any differences to me that could cause this. I use the mailbody in html to text action.

&nbsp; &nbsp;538,00</p>   results in => "      538,00\n\n"
&nbsp; &nbsp;528,00</p>   results in => "     \n 528,00\n\n"

i need the \n infront of 528,00 to go away.

they look exactly the same to me, so i can't figure out how to use something like replace() to fix this.

I can't just remove all &nbsp because i replace them later with / which i then use to split it into bits in powerquery.

2

There are 2 best solutions below

0
On

I have fixed this issue for me with adding a Compose action after the Html to text action with Inputs:

replace(body('Html_to_text'),decodeUriComponent('%0A%0A'),decodeUriComponent('%0A'))

0
On

I lived with it for awhile and just manually editing the output txt file.

But the issue seems to have been fixed on Microsofts end as it is not giving me wrong results anymore.