Skip to main content

Notifications

Community site session details

Community site session details

Session Id : 2YFuEUz31tvH+Lo4q32E2x
Power Automate - Building Flows
Suggested answer

How do you properly use newline "\n" in power automate

Like (1) ShareShare
ReportReport
Posted on 4 Oct 2024 17:16:53 by 6
Hi, since I couldnt find much about this online, and wanted to make a post so people in future with the same issue can find this when searching. Basically, when Im using the newline command on "Post message in a chat or channel", here is my command:
 
 
 

replace(string(outputs(‘Get_file_content’)?[‘body’]), ‘Member’, ‘Member \n’)

 
 
Basically, I want to have a new line after every occurence of the word "Member", but when I do this, it simply prints "\n" in plain text instead of a new line
 
Well, my actual goal is to have a new line after each row of the excel file, but since every one of them ends with "Member" I figured I could do it this way, but if there is an easier way to just do this instead that would be a bonus but I would really like to know what the proper format for using new line is. Thank you!!
Categories:
  • Michael E. Gernaey Profile Picture
    41,322 Super User 2025 Season 1 on 04 Oct 2024 at 19:18:25
    How do you properly use newline "\n" in power automate
    Hi!~!
     
    Can you share some of the ways you were searching. Trying to validate if our answers are working (in searches) or not, as its been answered a lot, but I definitely see people not able to find this or other topics).
     
    Wondering if its the new forum or not
     
    BTW EKrams answer is perfect and correct.
     
    Hopefully we can figure out the search issues
     
    THanks!!
  • Suggested answer
    Ellis Karim Profile Picture
    10,927 Super User 2025 Season 1 on 04 Oct 2024 at 18:33:45
    How do you properly use newline "\n" in power automate
    Try using the encoded characters for newline: %0A'
     
    Example:
     
    replace(variables('varString'),'member', concat('member',decodeUriComponent('%0A')))
     
     

     
     
    Ellis

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!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 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,679 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,015 Most Valuable Professional

Leaderboard
Loading started