cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Survey monkey - JSON help

I am trying to get the information form within a survey monkey response using the parse Json action.

I am no good with JSON and on buliding the flow simply used an example to build the action.

This has the following error:

[
  {
    "message""Required properties are missing from object: tag_data, text.",
    "lineNumber"0,
    "linePosition"0,
    "path""pages[0].questions[4].answers[0]",
    "value": [],
    "schemaId""#/properties/pages/items/properties/questions/items/properties/answers/items",
    "errorType""required",
    "childErrors": []
  },
  {
    "message""Required properties are missing from object: tag_data, text.",
    "lineNumber"0,
    "linePosition"0,
    "path""pages[0].questions[5].answers[0]",
    "value": [],
    "schemaId""#/properties/pages/items/properties/questions/items/properties/answers/items",
    "errorType""required",
    "childErrors": []
  },
  {
    "message""Required properties are missing from object: tag_data, text.",
    "lineNumber"0,
    "linePosition"0,
    "path""pages[0].questions[6].answers[0]",
    "value": [],
    "schemaId""#/properties/pages/items/properties/questions/items/properties/answers/items",
    "errorType""required",
    "childErrors": []
  }
]
 
Any ideas how I can fix this?
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Hi 

 

The cause of issue is your schema says tag_data is required and your test data is blank hence you getting the error.

 

 "required": [
       "tag_data",
        "text"
                   ]
 
 
Two options for you here.
 
1. Remove the required tag from the schema so that it becomes optional.
2. Make sure your test data contains tag data.


Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog

Power Automate Video Tutorials

View solution in original post

9 REPLIES 9
Highlighted
Community Support
Community Support

 

Hi @colbournescott ,

 

Could you provide sample data so that we can do similar tests?

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted

Thanks for helping.

This is the survey response I used to create the parse JSON step:

{
  "id""5673688026",
  "recipient_id""",
  "collection_mode""default",
  "response_status""completed",
  "custom_value""",
  "first_name""",
  "last_name""",
  "email_address""",
  "ip_address""103.14.95.242",
  "logic_path": {},
  "metadata": {
    "contact": {}
  },
  "page_path": [],
  "collector_id""15717459",
  "survey_id""17146279",
  "custom_variables": {},
  "total_time"120,
  "date_modified""2020-10-20T03:32:45+00:00",
  "date_created""2020-10-20T03:30:45+00:00",
  "pages": [
    {
      "id""64341400",
      "questions": [
        {
          "id""221429688",
          "answers": [
            {
              "tag_data": [],
              "text""Peter Freeman"
            }
          ]
        },
        {
          "id""221429689",
          "answers": [
            {
              "tag_data": [],
              "text""Opal Australian Paper"
            }
          ]
        },
        {
          "id""221429691",
          "answers": [
            {
              "tag_data": [],
              "text""0417508662"
            }
          ]
        },
        {
          "id""221429690",
          "answers": [
            {
              "tag_data": [],
              "text""peter.freeman@australianpaper.com.au"
            }
          ]
        },
        {
          "id""221429692",
          "answers": [
            {
              "choice_id""2797852040"
            }
          ]
        },
        {
          "id""221429693",
          "answers": [
            {
              "choice_id""2797852064"
            }
          ]
        },
        {
          "id""221429694",
          "answers": [
            {
              "choice_id""2797852068",
              "row_id""2797852078"
            }
          ]
        },
        {
          "id""221429695",
          "answers": [
            {
              "tag_data": [],
              "text""They are pleasant to deal with and go out of their way to ensure they supply a great service"
            }
          ]
        }
      ]
    }
  ]
}
Highlighted

Any update Barry please?

Highlighted

Hi @colbournescott 

 

Add a Parse JSON Step, map the content as your JSON, under the schema click generate from sample, copy your sample JSON data and click ok. At this stage Power Automate creates the schema. Next step onwards you can get your data from Dynamic contents of Parse JSON step.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog

Power Automate Video Tutorials
Highlighted

Thank you.  Please note this is what I tried and I get the following error:

colbournescott_0-1604464321392.png

Would you like a copy of the inputs and outputs to see what is going wrong?

 

Highlighted
Super User III
Super User III

Hi @colbournescott 

 

Could you post a screenshot of your JSON Schema you generated. Looks like you have generated the JSON data which has some mandatory values. You either remove those values from the schema or your test data missing the mandatory values.

 

Thanks

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog

Power Automate Video Tutorials
Highlighted

Thanks again.  Here is the schema:

{
    "type""object",
    "properties": {
        "id": {
            "type""string"
        },
        "recipient_id": {
            "type""string"
        },
        "collection_mode": {
            "type""string"
        },
        "response_status": {
            "type""string"
        },
        "custom_value": {
            "type""string"
        },
        "first_name": {
            "type""string"
        },
        "last_name": {
            "type""string"
        },
        "email_address": {
            "type""string"
        },
        "ip_address": {
            "type""string"
        },
        "logic_path": {
            "type""object",
            "properties": {}
        },
        "metadata": {
            "type""object",
            "properties": {
                "contact": {
                    "type""object",
                    "properties": {}
                }
            }
        },
        "page_path": {
            "type""array"
        },
        "collector_id": {
            "type""string"
        },
        "survey_id": {
            "type""string"
        },
        "custom_variables": {
            "type""object",
            "properties": {}
        },
        "edit_url": {
            "type""string"
        },
        "analyze_url": {
            "type""string"
        },
        "total_time": {
            "type""integer"
        },
        "date_modified": {
            "type""string"
        },
        "date_created": {
            "type""string"
        },
        "href": {
            "type""string"
        },
        "pages": {
            "type""array",
            "items": {
                "type""object",
                "properties": {
                    "id": {
                        "type""string"
                    },
                    "questions": {
                        "type""array",
                        "items": {
                            "type""object",
                            "properties": {
                                "id": {
                                    "type""string"
                                },
                                "answers": {
                                    "type""array",
                                    "items": {
                                        "type""object",
                                        "properties": {
                                            "tag_data": {
                                                "type""array"
                                            },
                                            "text": {
                                                "type""string"
                                            }
                                        },
                                        "required": [
                                            "tag_data",
                                            "text"
                                        ]
                                    }
                                }
                            },
                            "required": [
                                "id",
                                "answers"
                            ]
                        }
                    }
                },
                "required": [
                    "id",
                    "questions"
                ]
            }
        }
    }
}
Highlighted

Hi 

 

The cause of issue is your schema says tag_data is required and your test data is blank hence you getting the error.

 

 "required": [
       "tag_data",
        "text"
                   ]
 
 
Two options for you here.
 
1. Remove the required tag from the schema so that it becomes optional.
2. Make sure your test data contains tag data.


Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog

Power Automate Video Tutorials

View solution in original post

Highlighted

That did it, thank you very much.

The only annoying thing is the format of the answers.  But that is a survey monkey issue, rather than a Power Automate one.

 

Thanks again.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Solution Authors
Top Kudoed Authors
Users online (9,598)