Skip to main content

Notifications

Community site session details

Community site session details

Session Id : +YdWBeT8LHcme8+qrQHnZz
Power Automate - Building Flows
Answered

How to add line break after , in power automate.

Like (0) ShareShare
ReportReport
Posted on 2 Aug 2022 09:36:03 by 12

Hi

Is it possible to add line breaks in power automate? I have created a Forms answer and there is a question with a long line for text, the user has been instructed to end the line with a ",", I would therefore like to break the lines in the power automate so that when the flow sends me an email with new answers, the answers should be filtered according to this way.
Answer 1
Answer 2
Answer 3
Today I get these answers: answer 1, answer 2, answer 3.

  • MicSokoli Profile Picture
    12 on 02 Aug 2022 at 12:47:28
    Re: How to add line break after , in power automate.

    Than you Paulie this did it! and also thank you very much Caspar!

  • Verified answer
    Paulie78 Profile Picture
    8,407 Super User 2025 Season 1 on 02 Aug 2022 at 11:38:26
    Re: How to add line break after , in power automate.

    Because your intended output is an email, you want a BR tag, not a new line. Take a look at the following:

     

    break.png

    This produces the output:

    answer 1<br /> answer 2<br /> answer 3

    Which would work well in your email.

    The expression I used is:

    replace(outputs('Compose'), ',','<br />')

    You would need to replace: outputs('Compose') with the response from your form.

     

    Blog: tachytelic.net

    YouTube: https://www.youtube.com/c/PaulieM/videos

    If I answered your question, please accept it as a solution 😘

  • MicSokoli Profile Picture
    12 on 02 Aug 2022 at 10:40:10
    Re: How to add line break after , in power automate.

    Hi Caspar
    Thank you for the answer.

    I dont understand what you mean by "change the 'outputs('Compose_-_Anwer')' part with the dynamic value of the answer of the form..."

    I will send you my flow and you can see what i have done wrong since its not formating.

    Please see pictues below.

    Pic1.PNGPic2.PNG

     

  • Verified answer
    Caspar_Rubin Profile Picture
    830 on 02 Aug 2022 at 09:49:44
    Re: How to add line break after , in power automate.

    Hey,

     

    you could create a variable (initialize variable action) named "NewLine", Type "String" and Value is just a new line (press enter once inside the text field)

    Then you can use the replace() function to replace all commas with the NewLine variable. 

    Expression used: 

     

    replace(outputs('Compose_-_Anwer'), ',',variables('NewLine'))
     
    change the 'outputs('Compose_-_Anwer')' part with the dynamic value of the answer of the form...
     
    So basically this:
     
    Caspar_Rubin_0-1659433744637.png

     

     

    results in this:

     

    Caspar_Rubin_1-1659433759883.png

     

     

    let us know if this works for you!

     

    cheers

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,079 Most Valuable Professional

Leaderboard