Skip to main content

Notifications

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:
  • FLMike Profile Picture
    FLMike 29,371 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
    EKarim Profile Picture
    EKarim 10,445 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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #9 Get Recognized…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 144,316

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,290

Leaderboard