web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Automate
Answered

Parse JSON Issue

(0) ShareShare
ReportReport
Posted on by 10
Hi Guys,
 
Banging my head against a brick wall here.
 
I have some JSON that i am parsing from a HTTP request.  Done this many times with no issue.  I have a specific return of type number that i am struggling to do anything with.  Parse JSON seems to work, but then using the variable anywhere just passes a null.  I have tried converting and formatting as number (type n4).  But i just keep getting the input passed in as null and therefore an error.  Any help much appreciated.
 
Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    69,397 Most Valuable Professional on at
    Could you provide an example of what you mean about "using the variable"?  The number is a floating point number. If you use it like a string or an integer you will get a null.

    ----------------------------------------------------------------------------------
    If this Post helped you, please click "Does this answer your question" and give it a like to help others in the community find the answer too!

    Paul Papanek Stork, MVP
    Blog: https://www.dontpapanic.com/blog
     
  • Suggested answer
    venturemavenwill Profile Picture
    1,198 Super User 2026 Season 1 on at
    Could you check the schema in SQL to see what kind of data type the column is expecting?
    A type mismatch could also cause a null value during insertion.  
  • CW-27040836-0 Profile Picture
    10 on at
    Thanks for the advice.
     
    The SQL type is also a float.
     
    What is confusing me though is that the input to the SQL is coming through as null.  If it was a type mismatch would it not come through as the number and then reject it during the processing ?
    Below is the input to the SQL write.
    I have also tried saving it as various types of variable in automate, it always comes back as null being passed and throws an error.

  • Pstork1 Profile Picture
    69,397 Most Valuable Professional on at
    Can you show a screenshot of how you are passing the values from the Parse JSON into SQL?  I suspect you need a specific data type cast at that spot to make sure the number is what SQL is expecting.

    ----------------------------------------------------------------------------------
    If this Post helped you, please click "Does this answer your question" and give it a like to help others in the community find the answer too!

    Paul Papanek Stork, MVP
    Blog: https://www.dontpapanic.com/blog
     
  • Suggested answer
    venturemavenwill Profile Picture
    1,198 Super User 2026 Season 1 on at
    A bit of a brute force method, but try to manually define everything to see if you are able to retrieve a value. In your case you would insert the following formula into the field
     
    float(body('Parse_JSON')?['body']?['result']?['score'])
    This forces the flow to look at exactly the place defined in your JSON, and cast it as a float. 
  • CW-27040836-0 Profile Picture
    10 on at
    No joy forcing it either. 
     
    I have expanded the troubleshooting and found that actually nothing is coming out of the parse JSON.  Even though the output looks fine all of the variables when used are null.

    As you can see in the above screenshots results.verdict = Risky and that is being picked up in the Parse JSON block.  When i try and do anything with this it just returns null.
  • Pstork1 Profile Picture
    69,397 Most Valuable Professional on at
    Try using a Compose instead of a Variable.  Variables will do automatic casting so it depends what type Variable you pick.  Compose will retain it as JSON.

    ----------------------------------------------------------------------------------
    If this Post helped you, please click "Does this answer your question" and give it a like to help others in the community find the answer too!

    Paul Papanek Stork, MVP
    Blog: https://www.dontpapanic.com/blog
     
  • Verified answer
    venturemavenwill Profile Picture
    1,198 Super User 2026 Season 1 on at
    Can you also try
     
    float(body('Parse_JSON')?['result']?['score'])
    or even
     
    float(body('HTTP')?['result']?['score'])

    And see if either of these variables work?
  • CW-27040836-0 Profile Picture
    10 on at
    That seems to be working this morning.
     
    Thanks, I can now move on with my life !
     
    Bizarely one of the other flows that i have using Parse JSON went down yesterday (just seen the failure reports), but this morning it is working fine.  I am wondering if this was some other sort of issue that compounded the fact.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 959

#2
Valantis Profile Picture

Valantis 872

#3
Haque Profile Picture

Haque 589

Last 30 days Overall leaderboard