Skip to main content

Notifications

Community site session details

Community site session details

Session Id : pXsQFHTzpOzwlZySpZmKtW
Power Automate - Building Flows
Answered

Delete new line (\n) in Power Automate expression/flow

Like (0) ShareShare
ReportReport
Posted on 30 Jun 2023 19:14:40 by

Hi everyone -

I am building a flow in PowerAutomate that will automate the job posting formatting process for my team.  The trigger is an MS Forms response, those responses feed into a Sharepoint site, and then the responses in the Sharepoint site feed into an MS Word Template.  Here are some pictures of the flow thus far: 

1.

jessicadduffey_0-1688150514344.png

2. jessicadduffey_1-1688150560182.png3.jessicadduffey_2-1688150587321.png

 

The flow is working beautifully thus far, with the exception of one thing.  Because the form responses are made up of text pasted from a pdf, extra spaces are being pulled into the response details (see a screenshot of the Output below from the Get Response Details step...and all of the "\n"s...):

jessicadduffey_3-1688150862150.png

Is there a step that I can build into the flow that will get rid of the New Lines (\n)?  Please be specific as I am not only a newer user to PowerAutomate, but I am also new to expressions, building strings, initializing variables, etc.  Any help that you have would be greatly appreciated.  Thank you!

 

JSON output from Get Response Details in its entirety is attached.

  • jessicadduffey Profile Picture
    on 12 Jul 2023 at 17:35:05
    Re: Delete new line (\n) in Power Automate expression/flow

    @rzaneti  - I don't know what happened over the weekend, but the flow appears to be working properly right now and we are going into testing phase!  Thank you for your help!

  • jessicadduffey Profile Picture
    on 05 Jul 2023 at 14:47:59
    Re: Delete new line (\n) in Power Automate expression/flow

    Of course!

    Raw Output (Body only) from Get Response Details: 

    },
    "body": {
    "responder": "anonymous",
    "submitDate": "7/3/2023 7:55:42 PM",
    "redf7abf4003b49519a50951efcb9f030": "This position reports to PS Medical Devices Head of Strategy and\nImplementation and is leading/overseeing implementation of PS-MD\nstrategic activities associated with key Med Device Product Supply\nprograms to fully realize planned benefits, accountable for over ~$20M\nin incremental economic value through implementation of large-scale\nstrategic initiatives to optimize performance of PS-MD operating unit.\nThe position holder will act as PMO for Maximize portfolio, which\nconsists of programs and projects aimed at implementation of PS-MD\nnetwork strategy. The position is responsible for the stewardship of\nthe business’ strategic initiatives and their coordination within the\norganization. This involves facilitating communications between multi\u0002functional team members and Sr Management to ensure key milestones and\ngoals are achieved. The position also supports the Head of PS-MD in all\nactivities, preparation of documentation, presentation etc. as needed.",
    "reb4af8bc9ac7412bb5b5eaa836fb0e01": "Test Dir PS MD Strategy",
    "r5c4690dcbcca457ea7107df5b97b9846": "",
    "r1d0020ffe205468687f16b7b5d04072e": "",
    "rcdc5e01800534c89bd0b0e02ed0f8473": "Lead/oversee special projects for Medical Device business.\nPossible projects could include integration, COGS reduction\ncoordination, footprint optimization, and international expansion or\ndivesture projects and on special projects that might cross over into\nother operating units in Bayer",
    "rfad3fba71dbc4d42a010fa82ebe89d1e": "",
    "r4f406e537fbe476e9b6c6cb09aaa6165": "Pittsburgh, PA, Indianola, PA or Saxonburg, PA",
    "r1a652b1d9d354b0fa2e2b1bfb8f97491": "",
    "r9a5bbe4f7c9e4117836e5bbeca665972": "Minimum of a Bachelor's degree",
    "r9d9bd72562eb41458930827e0a6a2150": "",
    "r8ef10a8333304df5a3cdf9d1c8984246": "Master's Degree or MBA",
    "ra5ffd9f4ca1a4ede871cf7f6628f9b11": "",
    "re6d2b744ff904b3b8ff34574e773432d": "",
    "r86f5e2825455420f947b5460e5177006": "",
    "rf8314e08e26947798e730dcd365f65ed": "Visa sponsorship may be offered for this role",
    "r6d0fb7037fab4e51a4e2c074d43a2201": "",
    "r2c413b562d854324938cedd82bc69e79": "Jessica Duffey",
    "r01a712e94fcb4ec5997eb61641e953da": "556600",
    "r0bd54a392af644f781c823c114ef6730": "Lead Maximize program office, project meetings and Maximize\nworkshops. Lead preparation and documentation of Maximize Portfolio\nExecutive Board (PEB) meetings",
    "re91ed6059181471b99749df2f8f27e39": "Leads communication, cross-divisional projects, PS-PH LT\npresentations, ongoing StraCo initiatives, advisory boards, & general\ncommunications. Act as the point person to answer Pharma Product Supply\nquestions associated with Medical Devices (such as Business Review\ninformation)",
    "rb1e3007184924c0a8aea5206669aaf91": "As PS-MD GPPM, lead central maintenance of the PlanView\nportfolio/project management system for PS-MD projects and programs",
    "r146253a72b36434e98f13bed2b0c39ed": "Support optimization of performance of PS Medical Device operating\nunit within Pharma PS, by implementing strategies and projects which\ncontinuously improve products and processes related to manufacturing and\ncost of goods",
    "rdc6b71bffb764f5a90336626d6f2b3c6": "Manage execution of complex business operations and maintain clear\nexpectations and accountability for all strategy within Medical Devices\noperating unit",
    "rfd758744da6746039584cd8907ffd0e7": "Work closely with finance team and marketing organizations (global\n& local) to ensure consistency and coordination of information across\ndifferent Medical Devices business units",
    "r05f1fe147af5444fb6183fae00ac4df4": "Work on business development initiatives in conjunction with\nPharma PS Strategic Initiatives or with PH-PS LT teams as appropriate",
    "rae8989ed360f4acb86bda175b02d2c92": "Provide integrated analytical support and strategic consultation\nto senior management on major issues facing the business",
    "r82a7897c4b6345e1b4fbb6bc8c05e84f": "Participate in and/or lead the preparation of briefings,\npresentations and/or reports on behalf of senior management on strategic\ninstitutional and operational issues",
    "rf4a49a532efd4d149a8a915826e0f4a2": "Some years of experience working with key stakeholders/leaders (for\nexample site leadership level or higher)",
    "rd4744411f3dc4300aa013e4c10346d02": "Significant\nprofessional experience with demonstrated career progression and\nexercising high-level of strategy development, consulting, program\nmanagement, organizational, process and technical innovation skills",
    "rcc1423e49a974f1f8f8b064943267834": "Engineering, Functional Management or Project Management Experience",
    "reba660ddf3c046e980c59b40894c3035": "Prior experience in strategy or\nmanagement consulting environment",
    "rd3345e3fb5a64030a15a0c4fae186dd8": "Ability to find creative solutions and the ability to manage\nmultiple technical functions and to steer through the complex processes\nof a global operating unit",
    "r46e3941230034a9a929510a1d356a440": "Capability to integrate diverse ideas and cultural differences",
    "r2f773b295d124d598a001b06dfe1bddd": "Effective interpersonal skills",
    "r5cf8d7ab5e4746869003ba4785548253": "3-5 years of experience working with key stakeholders/leaders (for\nexample site leadership level or higher)",
    "rc2d26bbba28d42eaa0cf263ec479bdec": "At least 10 years of\nprofessional experience with demonstrated career progression and\nexercising high-level of strategy development, consulting, program\nmanagement, organizational, process and technical innovation skills",
    "rd9fa94f4e26043218391bddd6a12d7ca": "Prior experience of at least 3-5 years in strategy or\nmanagement consulting environment",
    "r3f0b427f39be465d8dd4b5fe71b1de65": "",
    "r6cc7ce072a354c0c80b389a7830b5d3f": "",
    "r8fe2e10d1d874fbebe68c9fc8e66f5aa": "",
    "r1a5860721cba4c88b6336cf73713aaad": "",
    "rd7a7ed2bab5f468f872d5b01f7974a4c": "High degree of customer focus",
    "raf3b8b9292484042b1c9adb24602d2bd": "Leadership and influencing skills and experience; ability to deal\nwith senior client management in often complex situations",
    "r79e83695695f478583c31f973e1ff656": "",
    "rc5821e3c0f824fb48ab7aeffeb9a9807": ""
    }
    }
     
    Inputs from Update File Properties:
    {
    "host": {
    "connectionReferenceName": "shared_sharepointonline",
    "operationId": "PatchFileItem"
    },
    "parameters": {
    "dataset": "https://bayergroup.sharepoint.com/sites/JobPostingFormattingTestApp2",
    "table": "2d91c37b-d99d-4ab2-882b-8b7c4badd3c3",
    "id": 10,
    "item/Title": "Test Dir PS MD Strategy",
    "item/First_x0020_and_x0020_Last_x0020_Name": "Jessica Duffey",
    "item/Introduction_x0020_Paragraph": "This position reports to PS Medical Devices Head of Strategy and Implementation and is leading/overseeing implementation of PS-MD strategic activities associated with key Med Device Product Supply programs to fully realize planned benefits, accountable for over ~$20M in incremental economic value through implementation of large-scale strategic initiatives to optimize performance of PS-MD operating unit. The position holder will act as PMO for Maximize portfolio, which consists of programs and projects aimed at implementation of PS-MD network strategy. The position is responsible for the stewardship of the business’ strategic initiatives and their coordination within the organization. This involves facilitating communications between multi\u0002functional team members and Sr Management to ensure key milestones and goals are achieved. The position also supports the Head of PS-MD in all activities, preparation of documentation, presentation etc. as needed.",
    "item/Job_x0020_Posting_x0020_Title": "Test Dir PS MD Strategy",
    "item/Pref_x0020_Qual_x0020_1": "Master's Degree or MBA",
    "item/Pref_x0020_Qual_x0020_10": "",
    "item/Pref_x0020_Qual_x0020_2": "3-5 years of experience working with key stakeholders/leaders (for example site leadership level or higher)",
    "item/Pref_x0020_Qual_x0020_3": "At least 10 years of professional experience with demonstrated career progression and exercising high-level of strategy development, consulting, program management, organizational, process and technical innovation skills",
    "item/Pref_x0020_Qual_x0020_4": "Prior experience of at least 3-5 years in strategy or management consulting environment",
    "item/Pref_x0020_Qual_x0020_5": "",
    "item/Pref_x0020_Qual_x0020_6": "",
    "item/Pref_x0020_Qual_x0020_7": "",
    "item/Pref_x0020_Qual_x0020_8": "",
    "item/Pref_x0020_Qual_x0020_9": "",
    "item/Relocation_x0020_Offered_x003F_": "",
    "item/Req_x0020_Qual_x0020_1": "Minimum of a Bachelor's degree",
    "item/Req_x0020_Qual_x0020_10": "Leadership and influencing skills and experience; ability to deal with senior client management in often complex situations",
    "item/Req_x0020_Qual_x0020_2": "Some years of experience working with key stakeholders/leaders (for example site leadership level or higher)",
    "item/Req_x0020_Qual_x0020_3": "Engineering, Functional Management or Project Management Experience",
    "item/Req_x0020_Qual_x0020_4": "Engineering, Functional Management or Project Management Experience",
    "item/Req_x0020_Qual_x0020_5": "Prior experience in strategy or management consulting environment",
    "item/Req_x0020_Qual_x0020_6": "Ability to find creative solutions and the ability to manage multiple technical functions and to steer through the complex processes of a global operating unit",
    "item/Req_x0020_Qual_x0020_7": "",
    "item/Req_x0020_Qual_x0020_8": "Effective interpersonal skills",
    "item/Req_x0020_Qual_x0020_9": "High degree of customer focus",
    "item/Role_x0020_Duties_x002F_Qualifications_x0020_1": "Lead/oversee special projects for Medical Device business. Possible projects could include integration, COGS reduction coordination, footprint optimization, and international expansion or divesture projects and on special projects that might cross over into other operating units in Bayer",
    "item/Role_x0020_Duties_x002F_Qualifications_x0020_10": "Participate in and/or lead the preparation of briefings, presentations and/or reports on behalf of senior management on strategic institutional and operational issues",
    "item/Role_x0020_Duties_x002F_Qualifications_x0020_2": "Lead Maximize program office, project meetings and Maximize workshops. Lead preparation and documentation of Maximize Portfolio Executive Board (PEB) meetings",
    "item/Role_x0020_Duties_x002F_Qualifications_x0020_3": "Leads communication, cross-divisional projects, PS-PH LT presentations, ongoing StraCo initiatives, advisory boards, & general communications. Act as the point person to answer Pharma Product Supply questions associated with Medical Devices (such as Business Review information)",
    "item/Role_x0020_Duties_x002F_Qualifications_x0020_4": "As PS-MD GPPM, lead central maintenance of the PlanView portfolio/project management system for PS-MD projects and programs",
    "item/Role_x0020_Duties_x002F_Qualifications_x0020_5": "Support optimization of performance of PS Medical Device operating unit within Pharma PS, by implementing strategies and projects which continuously improve products and processes related to manufacturing and cost of goods",
    "item/Role_x0020_Duties_x002F_Qualifications_x0020_6": "Manage execution of complex business operations and maintain clear expectations and accountability for all strategy within Medical Devices operating unit",
    "item/Role_x0020_Duties_x002F_Qualifications_x0020_7": "Manage execution of complex business operations and maintain clear expectations and accountability for all strategy within Medical Devices operating unit",
    "item/Role_x0020_Duties_x002F_Qualifications_x0020_8": "Work on business development initiatives in conjunction with Pharma PS Strategic Initiatives or with PH-PS LT teams as appropriate",
    "item/Role_x0020_Duties_x002F_Qualifications_x0020_9": "Provide integrated analytical support and strategic consultation to senior management on major issues facing the business",
    "item/Role_x0020_Location": "Pittsburgh, PA, Indianola, PA or Saxonburg, PA",
    "item/Salary_x0020_max": "",
    "item/Salary_x0020_Min": "",
    "item/Visa_x0020_sponsorship_x0020_offered_x003F_": "Visa sponsorship may be offered for this role",
    "item/OData__ExtendedDescription": "556600",
    "item/{ContentType}/Id": "0x010100A0C890113D5B8941ADC01B86C900FE2900437232D67D8B3C4ABDA258F426C56A0C"
    }
    }
     
    Outputs from Update File Properties:
    {
    "statusCode": 200,
    "headers": {
    "Transfer-Encoding": "chunked",
    "Vary": "Origin,Accept-Encoding",
    "X-NetworkStatistics": "0,4204800,0,0,1962259,0,3660308",
    "X-SharePointHealthScore": "1",
    "X-MS-SPConnector": "1",
    "X-SP-SERVERSTATE": "ReadOnly=0",
    "DATASERVICEVERSION": "3.0",
    "SPClientServiceRequestDuration": "256",
    "SPRequestDuration": "257",
    "X-DataBoundary": "EU",
    "X-1DSCollectorUrl": "https://eu-mobile.events.data.microsoft.com/OneCollector/1.0/",
    "X-AriaCollectorURL": "https://eu-mobile.events.data.microsoft.com/Collector/3.0",
    "SPRequestGuid": "07e1aaf9-5af4-4ade-afdf-18481673ae3b",
    "request-id": "07e1aaf9-5af4-4ade-afdf-18481673ae3b",
    "MS-CV": "+arhB/Ra3kqv3xhIFnOuOw.0",
    "Strict-Transport-Security": "max-age=31536000",
    "X-FRAME-OPTIONS": "SAMEORIGIN",
    "Content-Security-Policy": "frame-ancestors 'self' teams.microsoft.com *.teams.microsoft.com *.skype.com *.teams.microsoft.us local.teams.office.com teams.microsoftonline.cn *.powerapps.com *.yammer.com *.officeapps.live.com *.office.com *.stream.azure-test.net *.microsoftstream.com *.dynamics.com *.microsoft.com onedrive.live.com *.onedrive.live.com securebroker.sharepointonline.com;",
    "MicrosoftSharePointTeamServices": "16.0.0.23821",
    "X-Content-Type-Options": "nosniff",
    "X-MS-InvokeApp": "1; RequireReadOnly",
    "Timing-Allow-Origin": "*",
    "x-ms-apihub-cached-response": "true",
    "x-ms-apihub-obo": "false",
    "Cache-Control": "max-age=0, private",
    "Date": "Mon, 03 Jul 2023 20:05:32 GMT",
    "P3P": "CP=\"ALL IND DSP COR ADM CONo CUR CUSo IVAo IVDo PSA PSD TAI TELo OUR SAMo CNT COM INT NAV ONL PHY PRE PUR UNI\"",
    "X-AspNet-Version": "4.0.30319",
    "X-Powered-By": "ASP.NET",
    "Content-Type": "application/json; charset=utf-8",
    "Expires": "Sun, 18 Jun 2023 20:05:32 GMT",
    "Last-Modified": "Mon, 03 Jul 2023 20:05:32 GMT",
    "Content-Length": "6667"
    },
    "body": {
    "@odata.etag": "\"3\"",
    "ItemInternalId": "10",
    "ID": 10,
    "Title": "Test Dir PS MD Strategy",
    "Modified": "2023-07-03T20:05:33Z",
    "Editor": {
    "@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
    "Claims": "i:0#.f|membership|jessica.duffey@bayer.com",
    "DisplayName": "Jessica Duffey",
    "Email": "jessica.duffey@bayer.com",
    "Picture": "https://bayergroup.sharepoint.com/sites/JobPostingFormattingTestApp2/_layouts/15/UserPhoto.aspx?Size=L&AccountName=jessica.duffey@bayer.com",
    "Department": "BUS-HRGL-HRGL-TA-NATA-TAPH",
    "JobTitle": "Talent Acquisition Pharma"
    },
    "Editor#Claims": "i:0#.f|membership|jessica.duffey@bayer.com",
    "OData__ExtendedDescription": "556600",
    "Created": "2023-07-03T20:05:26Z",
    "Author": {
    "@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
    "Claims": "i:0#.f|membership|jessica.duffey@bayer.com",
    "DisplayName": "Jessica Duffey",
    "Email": "jessica.duffey@bayer.com",
    "Picture": "https://bayergroup.sharepoint.com/sites/JobPostingFormattingTestApp2/_layouts/15/UserPhoto.aspx?Size=L&AccountName=jessica.duffey@bayer.com",
    "Department": "BUS-HRGL-HRGL-TA-NATA-TAPH",
    "JobTitle": "Talent Acquisition Pharma"
    },
    "Author#Claims": "i:0#.f|membership|jessica.duffey@bayer.com",
    "OData__DisplayName": "",
    "{Identifier}": "Shared%2bDocuments%252fGeneral%252fFormatted%2bJob%2bPostings%252fJessica%2bDuffey_556600_2023-07-03T20_05_25.docx",
    "{IsFolder}": false,
    "{Thumbnail}": {
    "Large": "https://northeurope1-mediap.svc.ms/transform/thumbnail?provider=spo&inputFormat=docx&cs=fFNQTw&docid=https%3a%2f%2fbayergroup.sharepoint.com%3a443%2f_api%2fv2.0%2fdrives%2fb!GAXaMqzURk6BIw2cCyXe8TNCIDa1L7dLo0nkv0C195B7w5EtndmySogri3xLrdPD%2fitems%2f01PD5P4UTECKZDVGYJBVGZWHTUYJND4YRT%3fversion%3dPublished&access_token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiIwMDAwMDAwMy0wMDAwLTBmZjEtY2UwMC0wMDAwMDAwMDAwMDAvYmF5ZXJncm91cC5zaGFyZXBv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wMDAwYWNmYzU0YmRAbGl2ZS5jb20iLCJzaGFyaW5naWQiOiJkZmI3NzkyNi0yM2ZjLTRhNDEtOGVmOS0zNmE5MTVlNWI4NjIiLCJ1dGkiOiIyYkYyOEJrYXNVRy1iMEhIWlhRTEFBIiwiYWNycyI6InIxLGMyLGMxIiwidHQiOiIwIiwiaXBhZGRyIjoiMjAuODIuMjQ2LjExNiJ9.WnmEERZhxPvoPyjcZ7AHC7ADBDaTMWVVrbgbsz-wkMc&width=176&height=176",
    "Small": "https://northeurope1-mediap.svc.ms/transform/thumbnail?provider=spo&inputFormat=docx&cs=fFNQTw&docid=https%3a%2f%2fbayergroup.sharepoint.com%3a443%2f_api%2fv2.0%2fdrives%2fb!GAXaMqzURk6BIw2cCyXe8TNCIDa1L7dLo0nkv0C195B7w5EtndmySogri3xLrdPD%2fitems%2f01PD5P4UTECKZDVGYJBVGZWHTUYJND4YRT%3fversion%3dPublished&access_token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiIwMDAwMDAwMy0wMDAwLTBmZjEtY2UwMC0wMDAwMDAwMDAwMDAvYmF5ZXJncm91cC5zaGFyZXBvaW50LmNvbUBmY2IyYjM3Yi01ZGEwLTQ2NmItOWI4My0wMDE0YjY3YTdjNzgiLCJpc3MiOiIwMDAwMDAwMy0wMDAwLTBmZjEtY2UwMC0wMDAwMDAwMDAwMDAiLCJuYmYiOiIxNjg4NDA3MjAwIiwiZXhwIjoiMTY4ODQyODgwMCIsImVuZHBvaW50dXJsIjoiOVV0S1RrQTVQMlN5dm11WjVySzVrWlNXZmFCVm1BOVNtZW5kNy91K3BWdz0iLCJlbmRwb2ludHVybExlbmd0aCI6IjExNyIsImlzbG9vcGJhY2siOiJUcnVlIiwidmVyIjoiaGFzaGVkcHJvb2Z0b2tlbiIsInNpdGVpZCI6Ik16SmtZVEExTVRndFpEUmhZeTAwWlRRMkxUZ3hNak10TUdRNVl6QmlNalZrWldZeCIsImFwcF9kaXNwbGF5bmFtZSI6IkFwcCBTZXJ2aWNlIiwiZ2l2ZW5fbmFtZSI6Ikplc3NpY2EiLCJmYW1pbHlfbmFtZSI6IkR1ZmZleSIsInNpZ25pbl9zdGF0ZSI6IltcImR2Y19kbWpkXCJdIiwibmFtZWlkIjoiMCMuZnxtZW1iZXJzaGlwfGplc3NpY2EuZHVmZmV5QGJheWVyLmNvbSIsIm5paSI6Im1pY3Jvc29mdC5zaGFyZXBvaW50IiwiaXN1c2VyIjoidHJ1ZSIsImNhY2hla2V5IjoiMGguZnxtZW1iZXJzaGlwfDEwMDMwMDAwYWNmYzU0YmRAbGl2ZS5jb20iLCJzaGFyaW5naWQiOiJkZmI3NzkyNi0yM2ZjLTRhNDEtOGVmOS0zNmE5MTVlNWI4NjIiLCJ1dGkiOiIyYkYyOEJrYXNVRy1iMEhIWlhRTEFBIiwiYWNycyI6InIxLGMyLGMxIiwidHQiOiIwIiwiaXBhZGRyIjoiMjAuODIuMjQ2LjExNiJ9.WnmEERZhxPvoPyjcZ7AHC7ADBDaTMWVVrbgbsz-wkMc&width=96&height=96"
    },
    "{Link}": "https://bayergroup.sharepoint.com/sites/JobPostingFormattingTestApp2/Shared%20Documents/General/Formatted%20Job%20Postings/Jessica%20Duffey_556600_2023-07-03T20_05_25.docx?d=w3ab21264099b4d0d9b1e74c25a3e6233",
    "{Name}": "Jessica Duffey_556600_2023-07-03T20_05_25",
    "{FilenameWithExtension}": "Jessica Duffey_556600_2023-07-03T20_05_25.docx",
    "{Path}": "Shared Documents/General/Formatted Job Postings/",
    "{FullPath}": "Shared Documents/General/Formatted Job Postings/Jessica Duffey_556600_2023-07-03T20_05_25.docx",
    "{ContentType}": {
    "@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedContentType",
    "Id": "0x010100A0C890113D5B8941ADC01B86C900FE2900437232D67D8B3C4ABDA258F426C56A0C",
    "Name": "Bayer Job Postings 2"
    },
    "{ContentType}#Id": "0x010100A0C890113D5B8941ADC01B86C900FE2900437232D67D8B3C4ABDA258F426C56A0C",
    "{IsCheckedOut}": false,
    "{VersionNumber}": "2.0"
    }
     
    Please, if there is anything else you need, let me know!
  • Verified answer
    rzaneti Profile Picture
    3,948 Super User 2025 Season 1 on 03 Jul 2023 at 20:32:00
    Re: Delete new line (\n) in Power Automate expression/flow

    Hi @jessicadduffey ,

     

    Can you please share and image of the body of (1) your trigger raw outputs, (2) your 'Update file properties' raw inputs and outputs. To access the raw inputs/outputs, you just need to go to the flow run page, navigate until the specific action and click in these buttons:

    rzaneti_0-1688416040308.png

     

     

    It will open a JSON view in a sidebar or in a new tab:

    rzaneti_1-1688416157379.png

     

    Find the "body" property (you can search it with Ctrl+F). Make sure to remove any sensitive content from the image before sharing it here 🙂

     

    If you have any trouble to find the raw inputs/outputs, let me know and I guide you! Also, this article provides additional details about how does these raw inputs/outputs work and how to access them: http://digitalmill.net/2023/06/29/how-to-access-the-raw-outputs-in-power-automate/

     

     

  • jessicadduffey Profile Picture
    on 03 Jul 2023 at 20:14:12
    Re: Delete new line (\n) in Power Automate expression/flow

    @rzaneti  - so this is interesting...

     

    See the screenshot below of the Sharepoint site.

     

    In the first iteration of the flow when I plugged in the replace expression, it worked beautifully.  As you can see, everything uploaded properly on the Sharepoint site and it appears that the line spaces were removed and replaced with a single space. 

    jessicadduffey_0-1688415062816.png

     

    The problem is that I forgot to include the .docx extension in the Create File step of my flow.

    jessicadduffey_1-1688415118820.png

     

    So, I went back in and corrected it by adding .docx onto the file name and ran it again: 

    jessicadduffey_2-1688415165597.png

     

    Now, the flow is completing successfully, but nothing is uploading into Sharepoint or into the Job Posting Template: 

    jessicadduffey_3-1688415227874.png

    Any ideas as to why this is happening or what I can do to fix?

     

    Thank you so much for your help thus far!

  • rzaneti Profile Picture
    3,948 Super User 2025 Season 1 on 03 Jul 2023 at 18:35:43
    Re: Delete new line (\n) in Power Automate expression/flow

    Hi @jessicadduffey ,

     

    You don't need to create the variables: I did it just to make it easy to show the outputs 🙂

     

    You can assign the dynamic content from each answer inside a 'replace' expression, which will be used directly in the file properties inputs.

  • jessicadduffey Profile Picture
    on 03 Jul 2023 at 15:40:18
    Re: Delete new line (\n) in Power Automate expression/flow

    @rzaneti just to clarify - are these two separate steps that I can take, or do I need to incorporate both (initializing the variable AND updating the file properties using the expression)?

  • jessicadduffey Profile Picture
    on 03 Jul 2023 at 15:03:49
    Re: Delete new line (\n) in Power Automate expression/flow

    Hello @rzaneti, thank you so much for your assistance!  

    I am editing the flow now to try this solution and will let you know how it turns out.

  • rzaneti Profile Picture
    3,948 Super User 2025 Season 1 on 30 Jun 2023 at 19:44:55
    Re: Delete new line (\n) in Power Automate expression/flow

    Hi @jessicadduffey ,

     

    If you want to just remove the new lines ('\n'), you can include this step (initialize variable 2): 

    rzaneti_0-1688153444503.png

     

    expression: replace(variables('original_text'), decodeUriComponent('%0A'), '')

     

    Output:

    rzaneti_1-1688153470931.png

     

    We are basically capturing all '\n' from the text and replacing it for "nothing". In Power Automate, you need to use the expression 'decodeUriComponent('%0A')' to access these line breaks. 

     

    If you want to replace the line breaks for a blank space, just change the '' for ' ' (two single quotes with a blank inside).

     

    To add an expression in your inputs, you need to click in 'Add dynamic content', which will appear right after you focus the input box. Sometimes the dynamic content box opens automatically. Inside the dynamic content box, select the 'Expression' tab: 

    rzaneti_2-1688153953772.png

     

    You can also apply dynamic contents (quick '1-click solution' to add contents that come from the output of your previous actions, just like you did to populate your 'Update file properties' inputs) inside your expression, by just writing any text in the expression input, clicking again in the 'dynamic content' tab and selecting the desired output:

    rzaneti_3-1688154152886.png

     

    yellow - 'Dynamic content' tab

    green - available dynamic content outputs to you insert into your expression. Your options may be different than mine, as it depends on your flow design

    blue - what will appear in your expression input after you click in a dynamic content

     

    To apply this step in you use case, you can directly use the expression in the 'Update file properties' inputs. Just make sure to replace the variables('original_text') part of the expression for the dynamic content of your form answers.

     

    Let me know if it works for you or if you need any additional help!

     

    -------------------------------------------------------------------------
    If this is the answer for your question, please mark the post as Solved.
    If this answer helps you in any way, please give it a like.

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!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,743 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,081 Most Valuable Professional

Leaderboard
Loading started