Skip to main content

Notifications

Community site session details

Community site session details

Session Id : vkq+XcTwBm7kJTA/HuyUxc
Copilot Studio - General
Unanswered

Line breaks for bot messages from output

Like (0) ShareShare
ReportReport
Posted on 12 Mar 2021 21:26:50 by 293

Hello,

In our chatbot we have a Power Automate Flow that passes a number of variables into a string value for the output. These are announcements that have a subject and a description field, that we pass through compose to the output for the message for the bot to display. There can be more than one announcement. We would like to format it so there are spaces between the announcements. This is currently what we get:
Bot Announcements.jpg
 We have tried:
1) Creating spaces in the variables themselves, which had no effect - it seems these are stripped out when the output is sent to the bot. 
2) Markdown (seems to have worked sometime in 2020 according to forum posts, but now only seems to work for images and videos)
3) HTML tags (break) - seems to have worked sometime in 2020 according to forum posts but no longer does

4) encoding URIs (you can see them showing in the picture above) - as per this post: https://powerusers.microsoft.com/t5/General/Power-Virtual-Agents-Rendering-line-breaks-on-bot-messages/td-p/590488 

 

Is there any way to do this successfully in 2021? Thanks!

Categories:
  • DS2 Profile Picture
    293 on 18 Mar 2021 at 15:33:20
    Re: Line breaks for bot messages from output

    Thank you @renatoromao - I'm still seeing the weird behaviour where the numbered nested list does not show consecutive numbers. And, still can't get a blank space between announcements:
    Announcement1.jpg 

    Announcement2.jpg

  • CU22081450-0 Profile Picture
    Most Valuable Professional on 18 Mar 2021 at 00:34:27
    Re: Line breaks for bot messages from output

    Hi @DS2 ,

     

    I tested on my side and that is not working, a bad experience, unfortunately.

    Recommend you to use Nested lists: Use markdown to format Power Automate approvals - Power Automate | Microsoft Docs

     

    Basically you will do:

    1. Subject 

    - Description

     

    2. Subject

    - Descrption 2

    - Another field 3

  • DS2 Profile Picture
    293 on 17 Mar 2021 at 23:58:52
    Re: Line breaks for bot messages from output

    Thank you, @renatoromao - it is better, but still can't get a line break into the output (maybe I'm doing something wrong?). As we use teams we are limited to Numbered Lists, Nested Numbered Lists or Forced Line Breaks. Using the example 2 in the Markdown doc does not result in a line break:
    This is line 1.(space, space) Line 2 has extra space before it.
    Here is our chatbot output now:
    Announcement1.jpg

    And here is what we've done in Power Automate:
    Announcement2.jpg

    Note that I've tried all manner of spaces, which did not work and also tried the numbered lists, but it would not do consecutive numbers. E.g. each announcement had a "1" before it, rather than 1, 2, 3 etc. 
    So markdown for us is kind of working, but not fully for sure. What's your experience with using markdown in PVA, has it worked properly for you? Thanks again!

  • CU22081450-0 Profile Picture
    Most Valuable Professional on 12 Mar 2021 at 21:42:40
    Re: Line breaks for bot messages from output

    Hi @DS2 ,

     

    Use markdown to do it, it'll work perfectly in this situation.

    https://docs.microsoft.com/en-us/power-automate/approvals-markdown-support

     

    Look at the limitations if you are using on Teams or something like that, but Markdown lists will work perfectly for you.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,731 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,075 Most Valuable Professional

Leaderboard
Loading started