cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RThorek
Level: Powered On

Parse JSON Showing Values in step body but all output values are null

I'm attempting to parse a http response to JSON and from there use it to send a notification (currently using Teams, doesnt really matter what the service is.

 

In the results after a flow runs you can see the original content, the schema (generated by either flow or an external service) and the body containing the results. This is all as expected. When it is output however the dynamic content placeholders, all named correctly from the schema/data, only return null values. 

 

The original JSON content exactly as it arrives (i've adjusted phone numbers and some SIDs in the data for privacy):

 

{"smsjson":{"ToCountry":"AU1","ToState":"1","SmsMessageSid":"SMe817731ef923413ab2de7c804e61b4f11","NumMedia":"01","ToCity":"1","FromZip":"1","SmsSid":"SMe817731ef923413ab2de7c804e61b4f11","FromState":"1","SmsStatus":"received1","FromCity":"1","Body":"Response catch 41","FromCountry":"AU1","To":"+614","ToZip":"1","NumSegments":"11","MessageSid":"SMe817731ef923413ab2de7c804e61b4f11","AccountSid":"1","From":"+614","ApiVersion":"2010-04-01"}}

 

The JSON Schema, NB this example uses a schema generated at the URL shown, same results occur if i use the built in schema generator.

 

 

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "id": "http://example.com/example.json",
  "definitions": {},
  "type": "object",
  "properties": {
    "smsjson": {
      "type": "object",
      "properties": {
        "AccountSid": {
          "type": "string"
        },
        "ApiVersion": {
          "type": "string"
        },
        "Body": {
          "type": "string"
        },
        "From": {
          "type": "string"
        },
        "FromCity": {
          "type": "string"
        },
        "FromCountry": {
          "type": "string"
        },
        "FromState": {
          "type": "string"
        },
        "FromZip": {
          "type": "string"
        },
        "MessageSid": {
          "type": "string"
        },
        "NumMedia": {
          "type": "string"
        },
        "NumSegments": {
          "type": "string"
        },
        "SmsMessageSid": {
          "type": "string"
        },
        "SmsSid": {
          "type": "string"
        },
        "SmsStatus": {
          "type": "string"
        },
        "To": {
          "type": "string"
        },
        "ToCity": {
          "type": "string"
        },
        "ToCountry": {
          "type": "string"
        },
        "ToState": {
          "type": "string"
        },
        "ToZip": {
          "type": "string"
        }
      }
    }
  }
}

 

And the body from the results (see screenshot):

 

{
  "smsjson": {
    "ToCountry": "AU1",
    "ToState": "1",
    "SmsMessageSid": "SMe817731ef923413ab2de7c804e61b4f11",
    "NumMedia": "01",
    "ToCity": "1",
    "FromZip": "1",
    "SmsSid": "SMe817731ef923413ab2de7c804e61b4f11",
    "FromState": "1",
    "SmsStatus": "received1",
    "FromCity": "1",
    "Body": "Response catch 41",
    "FromCountry": "AU1",
    "To": "+614",
    "ToZip": "1",
    "NumSegments": "11",
    "MessageSid": "11",
    "AccountSid": "1",
    "From": "+614",
    "ApiVersion": "2010-04-01"
  }
}

 

I'm by no means an expert here, fairly sure i've missed something obvious so happy to receive any advice!

 

JSON Flow Result

2 REPLIES 2
Community Support Team
Community Support Team

Re: Parse JSON Showing Values in step body but all output values are null

Hi @RThorek,

 

Could you please share your flow configuration in a screenshot here?

If the Parse JSON action works, then the dynamic content generated under it should also work.

Further, would you please copy the whole output body of the parse JSON Action?

Take a try with the Compose Action, see if workflow Definition Language could work with the contents:

Using the Azure Logic Apps Workflow Definition Language (WDL) in Microsoft Flow

Regards,

Michael

 

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
RThorek
Level: Powered On

Re: Parse JSON Showing Values in step body but all output values are null

this is the full flow configuration:

JSON Screenshot 1.jpegTop HalfJSON Screenshot 2.jpegBottom Half

 

and the whole body of the Parse JSON action outcome is here:

{
  "smsjson": {
    "ToCountry": "AU1",
    "ToState": "1",
    "SmsMessageSid": "SMe817731ef923413ab2de7c804e61b4f11",
    "NumMedia": "01",
    "ToCity": "1",
    "FromZip": "1",
    "SmsSid": "SMe817731ef923413ab2de7c804e61b4f11",
    "FromState": "1",
    "SmsStatus": "received1",
    "FromCity": "1",
    "Body": "Response catch 41",
    "FromCountry": "AU1",
    "To": "+614",
    "ToZip": "1",
    "NumSegments": "11",
    "MessageSid": "SMe817731ef923413ab2de7c804e61b4f11",
    "AccountSid": "ACab1",
    "From": "+614",
    "ApiVersion": "2010-04-01"
  }
}

I'll take a look at the compose action now, thanks!

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Users Online
Currently online: 169 members 5,947 guests
Please welcome our newest community members: