TL;DR: Define JSON schemas with types, required fields, constraints and format validation in Power Automate to keep your data clean and your flows reliable.

💡 Challenge

Managing JSON structures in Power Automate feels daunting without a solid grasp of how JSON objects, arrays and schemas fit together, and weak validation lets bad data slip into your flows.

✅ Solution

Learn the building blocks of JSON and JSON Schema, then use them in your Parse JSON steps to validate structure, types and constraints so your flows process data predictably.

🔧 How It’s Done

1. Basic structure

Use objects {} for key-value pairs and arrays [] for ordered lists.

{
  "name": "John Doe",
  "age": 30
}
["Apple", "Banana", "Cherry"]

2. Type restrictions

Give each field a type so data is interpreted correctly. A type can also be a list (e.g. allow null).

{
  "type": "object",
  "properties": {
    "name": { "type": "string" },
    "age": { "type": "number" },
    "verified": { "type": "boolean" },
    "nickname": { "type": ["string", "null"] }
  }
}

3. Detailed specifications

Define properties for objects and items for arrays.

"properties": {
  "name": { "type": "string" },
  "hobbies": {
    "type": "array",
    "items": { "type": "string" }
  }
}

4. Required fields

Use required to mark essential fields.

{
  "type": "object",
  "properties": {
    "name": { "type": "string" },
    "age": { "type": "number" }
  },
  "required": ["name"]
}

5. Constraints

Limit string lengths or numeric ranges.

"name": { "type": "string", "minLength": 2, "maxLength": 100 },
"age": { "type": "number", "minimum": 0, "maximum": 120 }

6. Format validation

Use format to validate values like email addresses or dates.

"email": { "type": "string", "format": "email" },
"birthday": { "type": "string", "format": "date" }

7. Add extra information

Add title and description to document each field.

"name": {
  "type": "string",
  "title": "User's Name",
  "description": "The full name of the user"
},
"age": {
  "type": "number",
  "title": "User's Age",
  "description": "The age of the user in years"
}

🎉 Result

By applying these structuring and validation techniques in your Power Automate flows, you improve data integrity, reduce errors, and make your automation more efficient.

🌟 Key Advantages

🔸 Clear data structures improve readability and maintainability.

🔸 Strict type validation minimizes errors and keeps processing consistent.

🔸 Customizable rules allow flexible data checking and manipulation.

Special thanks to Paul Murana for the great sneak peek.


🎥 Video Tutorial


🛠️ FAQ

1. What is the difference between JSON objects and arrays? Objects use curly braces to define key-value pairs, while arrays use square brackets to store ordered lists of values.

2. How do type restrictions improve JSON validation in Power Automate? Type restrictions ensure each field matches an expected data type, reducing errors and improving flow reliability.

3. Can I include multiple formats like email and date validations in one schema? Yes, you can use the format attribute on different properties to enforce email, date, URI, and other standard validations.


Marcel Lehmann

Marcel Lehmann

Microsoft MVP Microsoft MVP

BizzApps MVP from Switzerland 🇨🇭 - PowerPlatform Expert & Evangelist & MVP - Turning passion into expertise

MVP since 2023 Power Platform Expert since 2017