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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Line Break in Sharepoi...
Power Automate
Answered

Line Break in Sharepoint causes flow to fail

(0) ShareShare
ReportReport
Posted on by 289

hello Community,

 

I have a flow where 

 

1. User uses PowerApps to submit a form where the data of the form is stored in SharePoint

2. When a new row is generated, the flow kicks in and start

3. the flow then takes all the info from the generated row in SharePoint and convert into JSON 

4. Then JSON info then gets send to a website through API

 

The issue:

 

I have noticed whenever if someone submits the form through PowerApps, that has a line-break, 

 

for example - in one description box of the form, if I type: 

"Test

test"

 

then the flow will fail in the at the point reaching to http and says "bad request". 

 

I know the problem is I will need to switch the <br> into a string in JSON that also does the line-break but I don't how in the flow, I will make the flow read the content of the column data from share point, and whenever there is a line-break, concert into JSON accordingly. 

 

Any guidance is highly appreciated, thank you! 

Categories:
  • efialttes Profile Picture
    14,756 on at
    Hi!
    I think you can remove new lines by means of a replace() based expression
    https://powerusers.microsoft.com/t5/Using-Flows/replacing-newline/td-p/44961
    Please note this post is a bit old, I assume you will add the expression via dynamic content menu, so you should not add @
    Hope this helps
  • Verified answer
    efialttes Profile Picture
    14,756 on at

    Hi again

    I've just tested the NEw Line old trick, it still works. Plase note I have added a 'Compose NewLine' action block, and just hit the Enter button.

    Hope this helps

     

    Flow_NewLine.png

  • Verified answer
    lliu_western Profile Picture
    289 on at

    @efialttes  Thank you for your advice! I took your idea and tried it but it still failed at the http level. But then, I kept the idea of using 'compose data' as the first step to grab the data from sharepoint. Then have another 'compose data' again with an empty line break in there (so just press enter in the chat box". 

     

    Then, I added another step, which is 'initiate a variable' then I use the replace function within that variable and set the variable into string. Then after parsing it into JSON, the API accepts the JSON again! 

     

    Thanks a lot! 

  • efialttes Profile Picture
    14,756 on at

    @lliu_western 

    Glad it helped!

    Please note I've marked your last post also as a solution since you invested time describing the way you adapted your technique to your specific scenario, and I think it can be extremely useful for other community members facing this same issue in the future.

    Thanx for your making this community better!

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 307 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 289

#3
Henil Profile Picture

Henil 127

Last 30 days Overall leaderboard