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

Community site session details

Session Id : vp+yg54Th6A2K/oNrASeLR
Power Automate - Power Automate Desktop
Answered

Format list on outlook email - adding line breaks

Like (0) ShareShare
ReportReport
Posted on 29 Oct 2021 22:34:06 by 79

I have a process that goes thru a folder and creates a  list with the file names; then I need to email the list.

Everything is working well, except that when I send the email with the list, the text all runs together, instead of adding line breaks.

But when I display the list in a message, it does add line breaks.

 

How can I format my email to display the files in a readable way?

 

How it shows:

File1 File2 File 3

 

What I want:

File1

File2

File3

 

Thanks!

  • aperea2539 Profile Picture
    79 on 01 Nov 2021 at 16:28:35
    Re: Format list on outlook email - adding line breaks

    @MichaelAnnis , it might be a configuration issues, maybe? Because this didn't work for me either.
    I think is really weird that the list shows fine on a message and not on the email, but alas...
    But thank you for showing me the clipboard function.

  • Verified answer
    aperea2539 Profile Picture
    79 on 01 Nov 2021 at 16:25:12
    Re: Format list on outlook email - adding line breaks

    This worked for me!

    It is a bit of an overkill, BUT I already need to loop thru the items to divide my files into 2 separate lists, so, not too bad. Thank you!! @VJR 

  • MichaelAnnis Profile Picture
    5,721 Moderator on 01 Nov 2021 at 03:49:39
    Re: Format list on outlook email - adding line breaks

    This is is very odd, because I do just this, and I just have the list variable as a single line item and all are listed on their own line. 

    Try this:

     

    Set Clipboard Text %Files%
    In the Email, use %ClipboardText% instead of %Files%.

    Good luck. 

  • Verified answer
    VJR Profile Picture
    7,635 on 30 Oct 2021 at 03:22:10
    Re: Format list on outlook email - adding line breaks

    Hi @aperea2539 

     

    I do not know if there is an easier way.

    I had the same issue so I followed the below steps:

    - Created a new variable (MyFileList)

    - Read each current Item from the list of files returned in the Files variable by the "Get Files in Folder" action

    - Add a loop to add a html <BR> tag after every file name

    VJR_0-1635563903634.png

     

    - The above set variable is as below

     

    VJR_1-1635563999504.png

     

     

    - In the 'Body' parameter of "Send Email" action use %MyFileList%

    - This gave me an output with every file name in a new line

    Make sure to enable Body is Html in the Send Email action.

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

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 986 Moderator

#2
stampcoin Profile Picture

stampcoin 699 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 577 Super User 2025 Season 2