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 / Remove newline chars "...
Power Automate
Answered

Remove newline chars "\n" from JSON resulting from "Send an HTTP Request to SharePoint" action.

(0) ShareShare
ReportReport
Posted on by 11
I have a PowerApps-based flow that exports SharePoint list items containing an appended comments field in JSON when a button in a gallery is pressed. I used the ParseJSON function to receive the appended comments in a gallery on another screen. All is well, except that the comments in the JSON had "\n" (carriage returns) all over the place and I need to remove them. I tried using "Replace" in the flow after the "Send an HTTP Request to SharePoint" but an error says that it won't work on an object. It needs a string. Any assistance would be appreciated. Thank you.

Btw, I can also create my own "Append Comment" feature, but my customer wants to keep the SharePoint append comments column for now.
Categories:
I have the same question (0)
  • Verified answer
    DB-09092211-0 Profile Picture
    11 on at
    I was just able to use the "string" function against the JSON to convert it to a string and the "replace" function worked.
    replace(string(outputs('Send_an_HTTP_request_to_SharePoint")?['body'], '\n', '')

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 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard