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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Allow null value in ch...
Power Automate
Unanswered

Allow null value in child "When a HTTP request is received"

(0) ShareShare
ReportReport
Posted on by 166

In the past when I've had to parse JSON, or construct a schema, and I need to allow for "null", this has always worked for me in Power Automate:

 

{
 "type": "object",
 "properties": {
 "accountId": {
 "type": "string"
 },
 "industryTags": {
 "type": [
 "string",
 "null"
 ]
 }
 }
}

 

This is also confirmed here: https://stackoverflow.com/a/56708378/3123109.

Now I'm trying to work on a child flow and need it to receive null values and it isn't working. The field doesn't show up in the parent child request:

Screenshot from 2020-05-16 15-11-40.png

If I change it to "type": "string", then it does show up. But then inevitably some data is sent over without industryTags and it fails.

So how do I allow for null values in this use case?

Categories:
I have the same question (0)
  • abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @ishraqiyun77 

     

    Are you passing the null as expression?

     

    image.png

     

    Thanks

  • ishraqiyun77 Profile Picture
    166 on at

    No, I am just passing the value of the field from Dynamics 365. So if the field value is empty, it just passes it null.

  • abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @ishraqiyun77 

     

    Thanks for your quick reply. What's the error you getting? Make sure the child flow input is not mandatory.

     

  • ishraqiyun77 Profile Picture
    166 on at

    That is one thing I was trying to figure out how to do was not make it mandatory. How do you do that in the JSON scheme declaration?

     

    I don't have the error in front of me anymore, but it was something along the lines of: "Was expecting a string/integer, but received 'Null'."

  • abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @ishraqiyun77 

     

    The JSON scheme declaration you described earlier is correct other than you haven't specified the null optional set for accountId. Believe this was a typo and you already taken care of it in your flow.

     

    {
     "type": "object",
     "properties": {
     "accountId": {
     "type": "string"
     },
     "industryTags": {
     "type": [
     "string",
     "null"
     ]
     }
     }
    }

     

  • Min Rao Profile Picture
    187 on at

    @ishraqiyun77 

     

    Where (or how) you use the "industryTags" in your child?

    I try to reproduce by following parent and child flow. the result is if "industryTags" pass to child is null, then "industryTags" is not included in the http request (not sent over), if has some value then it will be included in request.

     

    parent.png

    child.png

     

     

  • charlePA Profile Picture
    2 on at

    Did anyone has an answer to this?

    I also facing the same issue. 

    I try  doing this 

    "type": [
     "string",
     "null"
     ]

    but doesn't work.

    Power automate wont save and if you try to validate it using paconn, it will gives you an error.

     

    The response looks like this:

    The error occurs because the 2nd item Count property is null.

    {
    	[
    		{
    			Name: "test 1",
    			Count: 1
    		},
    		{
    			Name: "test 2",
    			Count: null
    		}
    	]
    }

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 519 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 296 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard