cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
garethaw
Helper III
Helper III

Plain Text Email to HTML?

Hi,

 

I have some plain text with line breaks, when sending an email using "Send an email (v2)" the line breaks are lost.

 

I'm thinking if I can convert my plain text to html and then send the email my formatting will be retained.

 

How can this be done? It will need to convert any new lines i.e \r\n to <br>

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @garethaw ,

 

Please try:

replace(triggeroutputs()?['body/body'],decodeUriComponent('%0A'),'<br>')

 

Best Regards,

Bof

View solution in original post

7 REPLIES 7
Mira_Ghaly
Dual Super User II
Dual Super User II

@garethaw 

Can I ask which connector are you using, just did a test with outlook connector and it is working fine.

Mira_Ghaly_0-1652953387698.png

 

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
garethaw
Helper III
Helper III

garethaw_2-1652953946005.png

 

 

garethaw_0-1652953889149.png

 

The email output looks like this:

 

2 Toner Residual (Bk) = 51% Toner Residual (C) = 28% Toner Residual (M) = 1% Toner Residual (Y) = 45% 

 

 

Mira_Ghaly
Dual Super User II
Dual Super User II

@garethaw 

In your compose use <br/> in place of the line breaks and it should work as expected

 

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

Mira_Ghaly_0-1652954452572.png

 

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

The content of the email is dynamic "When a new email arrives in a shared mailbox (V2)" so this won't work.

 

I have also tried the following in my compose action:

replace(triggeroutputs()?['body/body'],'\r\n','<br/>')

Hi @garethaw ,

 

Please try:

replace(triggeroutputs()?['body/body'],decodeUriComponent('%0A'),'<br>')

 

Best Regards,

Bof

Bof you are a genius thank you so much!

 

Must of made about 4topics to fix this problem so really appreciate your help.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Users online (1,959)