cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Annabelle
Frequent Visitor

Help with figuring out which line to remove from Parse Json. User did not upload an attachment to form and it caused a failure.

Capture - Flow.PNG

 

Here is my Parse json.  A user fills our form and can include an attachment.  It they do not it fails.  If they do it succeeds.

 

{
    "type""array",
    "items": {
        "type""object",
        "properties": {
            "name": {
                "type""string"
            },
            "link": {
                "type""string"
            },
            "id": {
                "type""string"
            },
            "type": {},
            "size": {
                "type""integer"
            },
            "referenceId": {
                "type""string"
            },
            "driveId": {
                "type""string"
            },
            "status": {
                "type""integer"
            },
            "uploadSessionUrl": {}
        },
        "required": [
            "name",
            "link",
            "id",
            "type",
            "size",
            "referenceId",
            "driveId",
            "status",
            "uploadSessionUrl"
        ]
    }
}
2 ACCEPTED SOLUTIONS

Accepted Solutions

hi @Annabelle  what you need to do is manage a condition if the field Fileupload is empty or not.

see

part1.PNG

 

so if is empty go true part but if contains a file you can use parse json to get the link and the use that file



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA

View solution in original post

Hi @Annabelle 

 

Can you try this:

{
    "type": ["array","null"],
    "items": {
        "type": ["object","null"],
        "properties": {
            "name": {
                "type": "string"
            },
            "link": {
                "type": "string"
            },
            "id": {
                "type": "string"
            },
            "type": {},
            "size": {
                "type": "integer"
            },
            "referenceId": {
                "type": "string"
            },
            "driveId": {
                "type": "string"
            },
            "status": {
                "type": "integer"
            },
            "uploadSessionUrl": {}
        }
    }
}

 

if that does not work try this:

{
    "properties": {
        "name": {
            "type": "string"
        },
        "link": {
            "type": "string"
        },
        "id": {
            "type": "string"
        },
        "type": {},
        "size": {
            "type": "integer"
        },
        "referenceId": {
            "type": "string"
        },
        "driveId": {
            "type": "string"
        },
        "status": {
            "type": "integer"
        },
        "uploadSessionUrl": {}
    }

}

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

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips,
tricks, and guides
FlowAltDelete





View solution in original post

4 REPLIES 4
Jcook
Super User
Super User

Hello,

Can you try:
{
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"link": {
"type": "string"
},
"id": {
"type": "string"
},
"type": {},
"size": {
"type": "integer"
},
"referenceId": {
"type": "string"
},
"driveId": {
"type": "string"
},
"status": {
"type": "integer"
},
"uploadSessionUrl": {}
}
}
}

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

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips,
tricks, and guides
FlowAltDelete





Annabelle
Frequent Visitor

Flow still fails at same step.

hi @Annabelle  what you need to do is manage a condition if the field Fileupload is empty or not.

see

part1.PNG

 

so if is empty go true part but if contains a file you can use parse json to get the link and the use that file



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA

View solution in original post

Hi @Annabelle 

 

Can you try this:

{
    "type": ["array","null"],
    "items": {
        "type": ["object","null"],
        "properties": {
            "name": {
                "type": "string"
            },
            "link": {
                "type": "string"
            },
            "id": {
                "type": "string"
            },
            "type": {},
            "size": {
                "type": "integer"
            },
            "referenceId": {
                "type": "string"
            },
            "driveId": {
                "type": "string"
            },
            "status": {
                "type": "integer"
            },
            "uploadSessionUrl": {}
        }
    }
}

 

if that does not work try this:

{
    "properties": {
        "name": {
            "type": "string"
        },
        "link": {
            "type": "string"
        },
        "id": {
            "type": "string"
        },
        "type": {},
        "size": {
            "type": "integer"
        },
        "referenceId": {
            "type": "string"
        },
        "driveId": {
            "type": "string"
        },
        "status": {
            "type": "integer"
        },
        "uploadSessionUrl": {}
    }

}

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

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips,
tricks, and guides
FlowAltDelete





View solution in original post

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (2,234)