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

Line break in a Flow bot message to a Microsoft teams user

Dear Community,

 

I have an issue with Flow. 

I cannot find the right way to put a line break in a message sent from the Flow bot to a Microsoft Teams user.

Please fin down sreenshots of my flow and the output from Teams.Capture_Flow.PNG

 

Capture_FlowR.PNG

 

I tried all theses tags or sentences and none of them worked :

  • </br>; <br/>; <br>; <br />
  • \n; \\n; \n\n;
  • /n; /n/n; 
  • \r; \r\n; /r/n;
  • <p>***</p>

Could you please help me to find the best way to put a line break ?

 

Kind regards,

 

sBravoAS

1 ACCEPTED SOLUTION

Accepted Solutions
yashag2255
Dual Super User II
Dual Super User II

Hey @sBravoAS 

 

Nope. I tried multiple combinations with variables and compose actions but no luck. Guess we'll have to wait for the feature roll out for this one. 

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

16 REPLIES 16
yashag2255
Dual Super User II
Dual Super User II

Hey @sBravoAS 

 

This is currently not doable as per current capabilities. There is an idea on the forum to add this feature. Please upvote so that it might be considered in future releases: https://powerusers.microsoft.com/t5/Flow-Ideas/Ability-to-use-HTML-for-MS-Teams-Flow-bot-posts-to-us...
 
Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Hi @yashag2255 ,

 

Thank you for your answer ! Upvote done !


@yashag2255 wrote:

This is currently not doable as per current capabilities.


Is there a workaround for this issue ?

 

sBravoAS

yashag2255
Dual Super User II
Dual Super User II

Hey @sBravoAS 

 

Nope. I tried multiple combinations with variables and compose actions but no luck. Guess we'll have to wait for the feature roll out for this one. 

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

OceanA
Advocate IV
Advocate IV

The work round is to use adaptive cards:
1. Generate/append the text blocks as arrays
2. Join the values from the array using ',' and add directly to the json of the adaptive card

@OceanA Could you explain that a bit more?  If I'm understanding you correctly you still wouldn't have each record on a new line, but just a comma separated list with no line breaks. 

 

I'm interested in finding a way to take a list of recently uploaded files and include the files names in the adaptive card.  Ideally, each file name would appear on a new line.  For example, it might look something like this:

 

The following files were uploaded to the drop off folder:

File 1

File 2

File 3

 

I'm currently appending the files names to a string variable and then outputting that variable to an adaptive card.  The file names do not come though on a new line each time (I've tried various ways to get this to work), but rather one after another in a list with no line breaks.  

 

Any ideas how you might create a list with line breaks and include that in an adaptive card? 

Well, I asked this question a bit too soon.  I discovered a proper solution after testing again.  

 

I discovered that if I add "\n\n" (without the quotes) at the end of the file name when I'm looping through and appending to a string variable, that the json adaptive card honors those as line breaks.  Here are the screenshots in my Flow:

2020-05-13 11_07_29-Edit your flow _ Power Automate and 7 more pages - Work - Microsoft​ Edge.png2020-05-13 11_08_01-Edit your flow _ Power Automate and 7 more pages - Work - Microsoft​ Edge.png

@rjhale Nice work! Your method is much easier that what I was proposing earlier:

In the adaptive card json, where I've circled in red (image 1), that would be replaced with the output of variable to give a new json code (see image 2 onwards).

 

11.PNG


15.PNG14.PNG13.PNG12.PNG

Can anyone explain this better please?
I was trying to use Post a message as the Flow bot to a channel with the same line break issue - and i get that we need to edit the code, and i see the adaptive card as a different option - but that's where I get lost in your answers .... help please?

What part are you getting lost at?

gcamargo
Frequent Visitor

Hello sBravoAS, I know this is an old post, but I want to share my silly findings 🙂

 

Base on my trial and error process, the only thing I came up with was to add an extra line break in the message box. Now, this displays almost correctly in the web app or the desktop app, however, at mobile Teams it will display with the extra line break. If you were not aware, the mobile version displays the text properly without adding anything. If you formatted your message like

**Journal entry#:** Field1
**Description:** Field2

 

You will see the message with the line breaks on mobile, but in the web app or desktop you will see it all together, without proper spacing. So, I started to play with it and after many tries, this was the only thing that worked for me.

Flow setupFlow setup

 

The result is

Result WebApp and DesktopResult WebApp and Desktop

 

Hope this helps, I didn't see any comment about this odd approach, but at least it keeps things ordered.

 

Cheers,

 

Gus

gcamargo
Frequent Visitor

[Removed Duplicated Entry]

Aloumvrios
New Member

I used double carriage return and it worked for me. So just hit double Enter and the next line will appear in a new line

JODupuis
Regular Visitor

Hi @sBravoAS ,

 

I managed to work it ou by adding two spacebar at the end of my line

IE:

First line of text[space][space][enter]

Second line of text 

 

Test it, worked for me

When I tried @gcamargo 's fix and it worked I had a good laugh, after banging my head for awhile. 

I am suspecting this may not have worked in September 2019.

I'm hoping @sBravoAS can mark gcamargo's fix as the answer?  

It seems like the simplest way to get the appropriate results.

@sBravoAS I know I am posting two years later, so, to help and save time for the people here after this IS possible, insert a paragraph with a line break like this:

<p> insert text of paragraph 1 </p>

<p><br></p>

<p> insert text of paragraph 2 </p>

 

Please accept this as a solution if this helped, because if so, it should save time for everyone!

Atlantis_101
Regular Visitor

What worked for me was to create a new line variable with <p></p> 
I also tried <br>, worked just as well

 

2021-07-24_15-14-51.jpg

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.

Top Solution Authors
Users online (1,523)