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

Community site session details

Session Id : c1u7jXdOuIBQm5OqtvU6GL
Power Automate - Building Flows
Answered

Check for Missing Field When a HTTP Request is Received

Like (0) ShareShare
ReportReport
Posted on 7 Sep 2021 20:06:02 by 221

Hope everyone is doing good.

 

I have a trigger:

JeffGimo_0-1631044690796.png

The request body json schema is:

 

{
 "items": {
 "additionalProperties": false,
 "properties": {
 "key": {
 "type": "string"
 },
 "value": {
 "type": "string"
 }
 },
 "required": [
 "key",
 "value"
 ],
 "type": "object"
 },
 "type": "array", 
 "required": [
 "key",
 "value"
 ]
}

 

I am trying to output an error if a Field is missing.

 

Sample: When my request is like this below where there is no "value".

 

[
 { "key": "Request_ID" }
]

 

I need to output an error like "Missing Field: value".

 

Is this possible??

 

Here's a sample run where there is missing field.

It is still successful even though there is a missing field which is value.

JeffGimo_0-1631045070166.png

 

I have the same question (0)
  • Verified answer
    JeffGimo Profile Picture
    221 on 08 Sep 2021 at 13:05:17
    Re: Check for Missing Field When a HTTP Request is Received

    Found the solution under settings.>Schema Validation.

  • Expiscornovus Profile Picture
    32,205 Most Valuable Professional on 07 Sep 2021 at 21:04:58
    Re: Check for Missing Field When a HTTP Request is Received

    Hi @JeffGimo,

     

    I don't know if this is exactly what you are looking for but you could configure a run after for the has failed status on one of the next actions and output the actually error code.

     

    Below is an example of that.

     

    1. Retrieve the value field. And add another compose action after that with configure run after condition for has failed.

     

    configurerunafterhasfailed.png

     

    2. Use the following expression in that compose action

     

    actions('Compose')?['Error']['code']

     

    runafterfailed_errorcode.png

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 986 Moderator

#2
stampcoin Profile Picture

stampcoin 699 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 577 Super User 2025 Season 2

Loading complete