Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

no new line split when I open a .txt file

(0) ShareShare
ReportReport
Posted on by 33

Hey,
I'm trying to create a flow that get a .txt file content and sends it as an email. The problem is that the email I'm getting appears in one line, without the new lines in the .txt file.
how can I split the string to multiple lines?

Thank you.

  • ShayGur Profile Picture
    33 on at
    Re: no new line split when I open a .txt file

    That did it! thank you!

  • TheNextOne Profile Picture
    37 on at
    Re: no new line split when I open a .txt file

    @ShayGur when you paste the content of txt file on email body, try to append to every rows a new variable as the following one

     

    TheNextOne_0-1693316161884.png

    The value is a simple return character.

  • Ryan_B Profile Picture
    446 on at
    Re: no new line split when I open a .txt file

    What is the format of your text file? You can use the Split function to separate the line items as long as you can specify a separator. This will give you a single column table of the data, which you can then work with to format how you want in the email.

  • Verified answer
    ManishSolanki Profile Picture
    15,085 Super User 2025 Season 1 on at
    Re: no new line split when I open a .txt file

    Hi @ShayGur 

     

    You need to write an expression to replace new line characters with <br> tag. Pls refer the below example:

    ManishSolanki_0-1693312411768.png

    Expressions are written in the expression box as fx formulas (highlighted in above screenshot).

    Expression used in the above example:

    replace(outputs('Compose_2'),decodeUriComponent('%0A'),'<br>')

     Pls replace 'outputs('Compose_2')' with actual variable used in your flow.

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

    Thanks

  • ShayGur Profile Picture
    33 on at
    Re: no new line split when I open a .txt file

    It's a manually written .txt file, I just write a day summary to send to my boss. Each task completed is a new line, but it appears in one line in the email sent by the power Automate. 

  • TheNextOne Profile Picture
    37 on at
    Re: no new line split when I open a .txt file

    @ShayGur could you please explain better the implemented flow?

    What do you do to insert the new line character to the txt file?

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1