FlowLibs
Browse Cloud FlowsConnectorsAI ToolsDev ToolsPricingAboutContact
Dev Tools/JSON Schema

JSON Schema for Parse JSON

Stop Parse JSON failing at run time. The exact schema dialect behind the Parse JSON action and the "When a HTTP request is received" trigger — types, properties, required, items, and the nullable patterns that survive messy real-world payloads. Paste a sample into the generator for a ready-to-use schema, complete with required-array switches and a "never fails" nullable mode.

Power Automate16 min read·Updated 2026-06-16
JSON SchemaParse JSONData OperationsValidationCloud FlowsHTTPWebhooks
JSON → Parse JSON schema
Sample payload
Schema
{
  "type": "object",
  "properties": {
    "value": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "mail": {
            "type": "string"
          },
          "accountEnabled": {
            "type": "boolean"
          },
          "signInActivity": {
            "type": "object",
            "properties": {
              "lastSignIn": {
                "type": "string"
              }
            },
            "required": [
              "lastSignIn"
            ]
          },
          "assignedLicenses": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "skuId": {
                  "type": "string"
                }
              },
              "required": [
                "skuId"
              ]
            }
          },
          "department": {},
          "directReports": {
            "type": "integer"
          }
        },
        "required": [
          "id",
          "displayName",
          "mail",
          "accountEnabled",
          "signInActivity",
          "assignedLicenses",
          "department",
          "directReports"
        ]
      }
    },
    "@odata.count": {
      "type": "integer"
    }
  },
  "required": [
    "value",
    "@odata.count"
  ]
}

Paste the result into the Parse JSON action’s Schema box. Everything runs in your browser.

On this page

  • What Parse JSON needs
  • Anatomy of a schema
  • Types: JSON value → schema type → token
  • Nullability: the #1 Parse JSON failure
  • Objects: properties & required
  • Arrays: items, list vs. tuple
  • Validation keywords (and what Parse JSON enforces)
  • String formats & special values
  • Schema cookbook
  • Editing a generated schema
  • Common gotchas

What Parse JSON needs

The Parse JSON data operation and the When a HTTP request is received trigger both take a schema that describes the payload. The designer uses it for two jobs: to emit typed dynamic-content tokens for every property, and to validate the shape of the content at run time. The schema is a JSON Schema document in the draft-4-era vocabulary Logic Apps uses — a tree of nodes built from type, properties, items, and required.

Generate from sample, then edit

You rarely hand-write a schema. Under the Schema box choose Generate from sample (Parse JSON) or Use sample payload to generate schema (the Request trigger), paste a *representative* response — ideally one where every optional field is populated — and the designer infers the schema. Then edit it (see below). The generator on this page does the same, with extra switches.

The same schema, in several places

This dialect shows up beyond Parse JSON: the Request trigger's Request Body JSON Schema, custom-connector request/response definitions, and anywhere the designer turns JSON into tokens. Learn the schema once and it pays off across all of them. For where Parse JSON sits in a real HTTP flow, see the HTTP Requests & APIs guide.

Anatomy of a schema

Every schema is a tree of nodes. Each node declares a type; container nodes then describe their children — an object node carries a properties map, an array node carries an items schema. The root is almost always an object.

json
{
  "type": "object",
  "properties": {
    "status": { "type": "string" },
    "orders": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": { "type": "string" },
          "total": { "type": "number" }
        },
        "required": [ "id" ]
      }
    }
  },
  "required": [ "status" ]
}
A minimal schema: an object with a string, a nested array of objects, and a required key.
KeywordApplies toPurpose
typeEvery nodeThe JSON type: string, integer, number, boolean, object, array, null.
propertiesobjectMap of key → child schema. Drives the typed tokens.
itemsarraySchema for each element of the array.
requiredobjectKeys that must be present, or the action fails.
additionalPropertiesobjectWhether keys beyond properties are allowed (usually omitted).
The keywords you will actually use.

Types: JSON value → schema type → token

Each JSON value maps to one schema type, which in turn decides the kind of dynamic-content token you get downstream.

7/7
JSON valueSchema typeTokenNotes
"hello"`"string"`TextThe default for most fields.
42`"integer"`IntegerWhole numbers only — mind the integer/number trap below.
3.14`"number"`FloatAny real number — JSON has a single numeric type.
true / false`"boolean"`BooleanYes/No values.
{ … }`"object"`expands to fieldsCarries `properties`; drill in for child tokens.
[ … ]`"array"`ArrayCarries `items`; feed an Apply to each or Select.
null`{}` or `["…","null"]`Any / nullableA bare `{}` node matches any type.

The integer vs. number trap

If a sample shows a whole number (4), the generator infers "integer". If that field can ever be fractional (4.5), the value fails the "integer" node at run time — Microsoft's own docs call this out. When a number might have decimals, change "integer" to "number". Money, rates, and averages are the usual offenders.

Empty schema = any type

A node of {} (no type) matches anything. The generator emits it for a null sample, because it can't infer a type from null. It's also a deliberate escape hatch for a node whose shape is volatile or that you simply don't read — see the cookbook.

Nullability: the #1 Parse JSON failure

By far the most common Parse JSON error is a field that is null or absent in real data but typed as a non-null required value in the schema. APIs routinely omit empty fields or send null — and a node typed "string" rejects null, while a required key that's missing fails the whole action.

json
// fails when "department" comes back null
"department": { "type": "string" }

// tolerates null
"department": { "type": [ "string", "null" ] }
Make a node accept null by giving type an array that includes "null".
  • Allow null — change "type": "string" to "type": ["string", "null"] so a null value parses.
  • Make it optional — remove the key from the node's required array so an absent field doesn't fail.
  • Belt and braces — do both for any field you don't fully control; the action then never fails on that property.

Let the generator do it

The generator above has a Make all fields nullable switch: it adds "null" to every type and drops all required arrays, producing a schema that won't fail on missing or null data. Tighten it back up only for the fields you genuinely depend on.

Objects: properties & required

An object node lists each key under properties and (optionally) names mandatory keys in required. The generator's default — matching the designer — is to mark every key it saw as required, which is exactly why generated schemas are brittle.

json
{
  "type": "object",
  "properties": {
    "id":    { "type": "string" },
    "name":  { "type": "string" },
    "note":  { "type": [ "string", "null" ] }
  },
  "required": [ "id" ],
  "additionalProperties": false
}
Require only what you depend on; additionalProperties:false rejects unexpected keys.

Trim required to what matters

Over-broad required arrays are the usual cause of "Invalid type. Expected … but got Null" and missing-property failures. Keep in required only the keys your downstream actions actually read; let everything else be optional.

additionalProperties

Left out (the generator's default), extra keys in the payload are simply ignored — usually what you want. Set "additionalProperties": false only when you must reject any unexpected key. "additionalProperties": { "type": "string" } types a bag of arbitrary string-valued keys (see the cookbook).

Arrays: items, list vs. tuple

An array node describes its elements with items. A single schema under items means a homogeneous list — every element has the same shape. This is the form Power Automate generates and the one you almost always want.

json
"orders": {
  "type": "array",
  "items": {
    "type": "object",
    "properties": { "id": { "type": "string" } },
    "required": [ "id" ]
  }
}

"tags": {
  "type": "array",
  "items": { "type": "string" }
}
Array of objects (top) and array of scalars (bottom).

The designer samples only the first element

Built-in "Generate from sample" infers an array's items from the first element alone — so optional keys that appear only on later elements are missed, and you get null-token surprises. The generator on this page is stricter: it merges the keys across all sampled elements and marks as required only the keys present in every one.

Skip tuple validation

JSON Schema also allows a tuple form — items as an *array* of schemas, one per position. It's valid, but Power Automate's generator never emits it and tooling support is patchy. Stick to the single-schema list form.

Validation keywords (and what Parse JSON enforces)

JSON Schema has a rich constraint vocabulary, but Parse JSON is a parser, not a validator. It enforces the structural keywords (type, required) and uses properties/items to build tokens; the rest are valid schema but effectively documentation here.

10/10
KeywordConstrainsEnforced by Parse JSON?
typeThe JSON type of the valueYes — strict; a mismatch fails the action.
requiredKeys that must be presentYes — a missing key fails the action.
propertiesAn object's child schemasYes — drives the typed tokens.
itemsSchema for array elementsYes — drives the array tokens.
enum / constValue must be one of a setNot reliably — treat as advisory.
pattern / formatRegex or semantic string formatNot reliably — date-time stays plain text.
minimum / maximumNumeric boundsNot enforced.
minLength / maxLengthString length boundsNot enforced.
minItems / uniqueItemsArray size / uniquenessNot enforced.
additionalPropertiesAllow / forbid extra keysPartial — generally tolerant; safest omitted.

Don’t rely on Parse JSON for real validation

If you need to *reject* bad input — enforce an enum, a regex, a numeric range — do it yourself: a Condition, a Filter array, an Office Scripts call, or schema validation upstream. Parse JSON will happily pass a value your constraint keywords say is invalid.

String formats & special values

The format keyword annotates strings (date-time, email, uri…). Parse JSON keeps them as plain string tokens — format doesn't change the type or get enforced, so you reshape values yourself with expressions.

formatExample valueTreat it as
date-time2026-06-16T09:30:00ZA plain string — reshape with `formatDateTime()`.
date2026-06-16Plain string.
emailada@contoso.comPlain string.
urihttps://contoso.comPlain string.
uuid7c1f…e9Plain string (a GUID).
byte / binaryU29tZSBkYXRh…Plain string; decode with `base64ToBinary()`.
Common string formats and how to treat them.

Numbers that arrive as strings

Plenty of APIs quote their numbers ("amount": "123.45"). That's a "string", not a number — type it as such and cast in an expression with int(), float(), or decimal() when you need to do maths. See the Expressions guide.

Schema cookbook

Copy-paste starting points for the payloads you meet most. All are pre-relaxed where a field is commonly null — tighten required to taste.

Microsoft Graph collection (value array + nextLink)

json
{
  "type": "object",
  "properties": {
    "value": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id":          { "type": "string" },
          "displayName": { "type": "string" },
          "mail":        { "type": [ "string", "null" ] }
        },
        "required": [ "id" ]
      }
    },
    "@odata.nextLink": { "type": "string" }
  },
  "required": [ "value" ]
}

SharePoint / Dataverse rows (annotated OData)

json
{
  "type": "object",
  "properties": {
    "value": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "@odata.etag": { "type": "string" },
          "accountid":   { "type": "string" },
          "name":        { "type": "string" },
          "revenue":     { "type": [ "number", "null" ] }
        }
      }
    }
  }
}
Dataverse and SharePoint sprinkle @odata.* keys onto each row — type the ones you read, ignore the rest.

Webhook trigger body (When a HTTP request is received)

json
{
  "type": "object",
  "properties": {
    "event":     { "type": "string" },
    "timestamp": { "type": "string" },
    "data": {
      "type": "object",
      "properties": {
        "id":     { "type": "string" },
        "amount": { "type": "number" }
      },
      "required": [ "id" ]
    }
  },
  "required": [ "event", "data" ]
}

A root-level array

json
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "first": { "type": "string" },
      "last":  { "type": "string" }
    },
    "required": [ "first", "last" ]
  }
}
When the whole payload is an array, the root node is the array.

A dynamic key/value bag

json
{
  "type": "object",
  "additionalProperties": { "type": "string" }
}
Unknown keys, known value type — use additionalProperties instead of properties.

An unpredictable sub-tree

json
"metadata": {}
When a nested shape varies run-to-run, type it {} and read it with expressions.

Editing a generated schema

Treat the generated output as a first draft. A few quick edits turn a brittle schema into a robust one:

  1. Relax null-prone fields — add "null" to the type of anything optional or sometimes-empty.
  2. Trim `required` — keep only the keys you actually read downstream.
  3. Fix integer → number — for any value that can be fractional.
  4. Collapse volatile nodes to `{}` — sub-trees that change shape, or that you don't read.
  5. Delete the noise — drop @odata.* and other keys you'll never reference to keep the token list clean.
  6. Sample richly — paste a record where optional fields are populated, so the generator sees them at all.

Common gotchas

  • Null on a non-null type — "Invalid type. Expected String but got Null" means add "null" to that node's type.
  • Missing required key — a required field absent from the payload fails the action; remove it from required.
  • integer vs. number — a decimal value fails an "integer" node; widen to "number".
  • First-element sampling — the designer only reads array element [0]; optional keys on later items are missed (this generator merges them).
  • Constraint keywords don't validate — enum, pattern, format, minimum are advisory in Parse JSON; validate critical rules yourself.
  • Don't double-parse — connector actions usually return parsed objects already; only run Parse JSON / json() on raw strings.
  • Quoted numbers are strings — "123" is a "string"; cast with int() / float() when you need maths.
  • Secure the Request trigger — generating a schema from a sample doesn't authenticate callers; validate and gate the trigger (see the HTTP guide).
← All Dev ToolsUse these in your AI assistant →
Spotted an error or have a suggestion? Let us know
FlowLibs

A curated library of production-grade Power Automate cloud flow patterns. Packaged as managed solutions, ready to import into your environment.

Library

  • Browse Cloud Flows
  • Approvals
  • Email & Notifications
  • Reporting
  • Security & Compliance

AI

  • AI Tools
  • MCP Server
  • Generate a Token

Resources

  • About
  • FAQ
  • Support
  • Status
  • Contact
  • Power Automate Docs
  • Connector Reference

© 2026 FlowLibs. All rights reserved.

  • Privacy
  • Terms
  • Refunds
  • Cookies
  • Acceptable Use
  • DMCA
Help