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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / no new line split when...
Power Automate
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.

Categories:
I have the same question (0)
  • TheNextOne Profile Picture
    37 on at

    @ShayGur could you please explain better the implemented flow?

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

  • ShayGur Profile Picture
    33 on at

    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. 

  • Verified answer
    ManishSolanki Profile Picture
    15,091 Super User 2025 Season 2 on at

    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

  • Ryan_B Profile Picture
    446 on at

    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.

  • TheNextOne Profile Picture
    37 on at

    @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.

  • ShayGur Profile Picture
    33 on at

    That did it! thank 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard