cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RD
Frequent Visitor

Multiline field displays as single line in a mail send by flow

Hello,

 

I have a flow that sends an email on creation of a new sharepoint list item.

In this list i have multiline fields, when i add the dynamic content of a multiline field it places the content on a single line in the email.

 

So if the value of "Adres" is:

Straatnaam 1
6677 AA
Plaats

It wil be displayed in the e-mail as

Straatnaam 1 6677 AA Plaats

 

 

How can i change this?

 

regards

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-bacao-msft
Community Support
Community Support

Hi @RD,

 

You could set up Send an email-IS HTML.

If you do not select any options or select No, the message content will be displayed like this:

50.PNG

If you choose Yes, the message content will be displayed like this:

51.PNG

Please take a try.

 

Best Regards,

Barry

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

11 REPLIES 11
ScottShearer
Super User
Super User

@RD:

 

I just ran a quick test and found that I can reproduce your issue if I set "Is HTML" to yes in the email action.  If you set it to No, that should resolve the issue.  You can access this setting by clicking on Advanced Properties in the email action.

 

If this solves your problem, please mark your post as Solved.

 

Scott

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
v-bacao-msft
Community Support
Community Support

Hi @RD,

 

You could set up Send an email-IS HTML.

If you do not select any options or select No, the message content will be displayed like this:

50.PNG

If you choose Yes, the message content will be displayed like this:

51.PNG

Please take a try.

 

Best Regards,

Barry

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Hi @v-bacao-msft 

 

What if I need to use html format?

Is there anyway to do this with HTML mail?

I recently needed an HTML email that included multi line text from both both sharepoint and a text box within powerapps. I was able to find a solution.

 

Substitute(MyMultiLineTextField,Char(10),"<br>")

 

So leaving it as HTML, not plain text, then just converting the new lines to html breaks.

vwyankee
Helper V
Helper V

@josephspengler - Can you elaborate on how/where you are adding this? I'm not seeing substitute as an option in an expression, whether using a Compose step or right within the Send an Email body.

Paulie78
Super User
Super User

@vwyankee this is what you want:

replace(outputs('multiLineText'), decodeUriComponent('%0A'), '<br />')

Hope this helps.

Just about perfect. Thank you, @Paulie78 !!


I found I didn't need the space and forward slash and up with this which worked exactly as I needed:

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

 

*Edit* 

For others that may have similar struggles the above worked only after I manually went into my test SP list item and set line breaks but didn't work for the items I needed to that were written from a Power App. Digging into the Flow outputs I discovered why. In Power Apps I'm using char(13) for line breaks which translate to %0D, not %0A - result when created using char(10) in Power Apps - in the string value. After updating the formula above to %0D it worked on the data that I needed it to. 

 

I also understand now that @josephspengler is using the substitute operator in Power Apps not in Power Automate. I also had to utilize that for the same reason for a couple emails that are sent from Power Apps.

 

I don't recall exactly why I'm using char(13) vs char(10) but I want to say it was because I wasn't getting the line breaks to show in Power Apps using char(10). Now to educate myself on what the difference between the two are... 

Hi,

 

I didn't find on the Advance mode the option for Sending an email-IS HTML.

My PDP comment value below is sending as a single line 

Can you please advise how to get to this option 

Appreciate the help

Almog

Power automate email.PNG

It's the icon all the way on the right of your toolbar:

 

vwyankee_0-1635428143823.png

 

amoshe2
Frequent Visitor

Ok, and what now, I want that "PDP Comment" dynamic content will show as Multiline 

what I need to do? Do I need to create function or any other expression to enable it?

Thanks 

amoshe2_0-1635510055218.png

 

See this previous post. I am using this in a number of flows. Best to create it as a compose step and then just put the compose dynamic content in the email.

 

*Edit* - If you do it this way it doesn't matter if you put the email step in HTML or not.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (3,197)