web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / how do I add a new lin...
Power Automate
Answered

how do I add a new line or carriage return into a string?

(0) ShareShare
ReportReport
Posted on by 24

Hi,

 

I'm building a string of attached files in a SharePoint list (filename and URL for each attachment) to go into an email.

 

It works, but I would like a new line between each attachment in the email, how do I add a new line or carriage return into a string?

 

There is a similar subject post but I could not get anything to work?!?

 

So atm, my output is something like this:

File1 Url1 File2 Url2 File3 Url3 ...

 

and I would like:

File1 Url1

File2 Url2

File3 Url3

...

 

how to add CR.png

Categories:
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hello!

    Have you tried putting the return after your data in the "Append to string" variable action?

    at the end you will have a single return, but I assume that wouldn't be a problem as the string is being dropped into an email.

     

    I had my Flow loop through the rows in an excel table and append the value in the "Title" column to the string variable plus a carriage return, so every iteration of the loop adds the data to the blank line created in the last loop then adds a new line. I threw the variable into a Compose to see the output and it looked like it worked.

     

    Please tell me if this works for you!

     

    Kyle

     

     

    Append to String.png

  • Verified answer
    Lasse Profile Picture
    24 on at

    So after pulling my hair out for a while, I found that since the string is going inside an email I could add the HTML code </br> at the end to solve the problem.

     

    fixed.png

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Glad you found a solution!

     

    Good to know, too! I am not too HTML savvy, myself.

     

    Have a good one!

  • PrashantN1 Profile Picture
    8 on at

    Hi Kyle,

    Will you please elaborate on what steps you followed for this ("I threw the variable into a Compose to see the output and it looked like it worked.")? I am also facing same issue and getting blank line in between and also header names keep on repeating during the append operation.

  • pm325 Profile Picture
    30 on at

    "Compose" is an action that allows you to see the output of a previous step. So in this sense, he added the previous step into a compose action and it shows that the </ br> is correctly formatting the string.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 302 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 263

#3
Henil Profile Picture

Henil 115

Last 30 days Overall leaderboard