Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Error of "Http request failed: the content was not a valid JSON." when using REST to JSON connector

Error of "Http request failed: the content was not a valid JSON." when using REST to JSON connector. The body result contains CDATA formatting, and this custom connector's action's schema property is set to "String" type, with no specific "Format". I tried a format of "Binary" as well, and the same error occurred.


Why is the Flow trying to parse the result from this action's body result's string value? Can it not just return as a normal string and not be parsed by the flow?

Super User
Super User

HI @mysticode 


Is there a way for you to share an annonimized sample of your JSON so that we can take a look?


If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.


When this returns with "Value" being blank, my custom connector Method returns without any errors:


    "statusCode": 200,
    "headers": {
        "Cache-Control": "max-age=0, private",
        "Date": "Tue, 15 Sep 2020 21:43:52 GMT",
        "X-AspNet-Version": "4.0.30319",
        "Content-Length": "447",
        "Content-Type": "application/json"
    "body": {
        "projectRespondentResponseGetResponse": {
            "projectRespondentResponseGetResult": {
                "methodname": "ProjectRespondentResponseGet",
                "result": {
                    "success": true,
                    "id": "00000000-0000-0000-0000-000000000000",
                    "value": "",
                    "errors": []
However, if "Value" returns with the actual data I want, it causes the Flow error that I mentioned originally:
<![CDATA[{"answers":[{"answercompl":"","answertext":"","detail":"","element":"First Name:","idelement":"","progid":"","rowsorter":-1,"sorter":1000008,"subdetail":""},:""}

Helpful resources

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Users online (2,981)