cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
johnmarlowe
Advocate III
Advocate III

Registering Error when trying to add a flow

Hi 

I'm trying to add a flow into Powerapps and I keep getting a "Registering Error" Message.

When nI try running the flow outside of powerapps, it executes as succesfully and as expected, however I'm frustrated that I keep getting this message when trying to add it in to Powerapps.

 

Has anyone come accross this and knows why this happens?

 

Thanks

Andrew

14 REPLIES 14

It looks like you are trying to pass null as a value when defining the type e.g.

"per_page": {
        "type": [
              "number",
              "null"
         ]
},

 

Looking at an old file of mine I believe that it should be sent as:

 

"per_page": {
        "type": [
              "number"
         ]
},

 

Namely, you don't pass "null" as part of this process.

Hope that helps/works.

NewBee117
Kudo Collector
Kudo Collector

Unfortunately if I remove the null, Flow errors out: 

"message""Invalid type. Expected number but got Null."
That goes back to the API developer insists Null is the correct value to pass in json.

Looking at your sample you don't always pass a null

 

"in_datetime": {
                        "type": "string"
                       },
"out_datetime": {
                      "type": [
                                  "string",
                                            "null"
                                 ]
                      },

 

When you removed "null" did you also remove the square [ ] brackets?

 

Interestingly you also appear to be passing data (probably what the square brackets are for).

 

{
"type": "object",
           "properties": {
                    "data": {
                           "type": "array",
                                "items": {
                                     "type": "object",
                                        "properties": {
                                                        "id": {
                                                                "type": "number"
                                                                },
                                                        "group_id": {
                                                                "type": [
                                                                             "number",
                                                                              "null"
                                                                            ]
                                                                          },

 

I haven't used this method personally but as you don't appear to be passing a value with every field (as with "id" or "in_datetime" above) perhaps this is not helping.

 

It's probably worth stripping everything back and building up one field at a time to help pinpoint the issue.

 

If it helps this is an early working example I built up when working out how to handle nulls.

 

{

    "type": "array",

    "items": {

        "type": "object",

        "properties": {

            "Id": {

                "type": "integer"

            },

            "SFID": {

                "type": "string"

            },

            "ProductCode": {

                "type": "string"

            },

            "Name": {

                "type": "string"

            },

            "Active": {

                "type": "integer"

            }

        },

        "required": [

            "Id",

            "SFID",

            "ProductCode",

            "Name",

            "Active"

        ]

    }

}

 

Where the underlying data value was NULL I had to manually correct the type.

Holy smokes man you just saved my butt @GaryEden !!!!! I was stuck on this mess for a bit, let me tell yah. You are a scholar and a gentleman.

I would like to add that defining the property like this

"PROPERTYNAME": {
     "type"
          ["number","null"]
     }
hurts the registration (while working fine within power automate itself, I use it all the time).
So instead, when having null values, you should use 
"type":  "number"
and remove the property from the required list:
"required": []

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (1,649)