cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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

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

13 REPLIES 13
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

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

Advocate II
Advocate II

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?

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

Frequent Visitor

[Removed Duplicated Entry]

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

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

Helpful resources

Announcements
PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Users online (5,390)