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

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

12 REPLIES 12
Highlighted
Dual Super User III
Dual Super User III

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!
Highlighted

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

Highlighted

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

Highlighted
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

Highlighted

@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? 

Highlighted

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

Highlighted

@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

Highlighted

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?

Highlighted

What part are you getting lost at?

Highlighted
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

Highlighted
Frequent Visitor

[Removed Duplicated Entry]

Highlighted
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

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Solution Authors
Top Kudoed Authors
Users online (9,724)