Let's POWER Automate

From no-code to low-code

Menu
  • Expressions
  • Filters
  • General
  • Application specific solutions
    • Dataverse
    • Excel
    • Forms
    • Outlook
    • Planner
    • Power Apps
    • SharePoint
    • Teams
  • Triggers
  • Ready to use solutions
    • Approval Process Solution
    • Task Delegation App
    • The Ultimate Power Automate expressions cheat sheet
    • Power Automate HTTP requests to SharePoint cheat sheet
    • Power Automate HTTP requests to Graph API cheat sheet
  • ABOUT ME
  • Get help with your flow
  • POWER PLATFORM SERVICES
Menu

Use ‘Parse JSON’ to validate input in Power Automate flow

Posted on June 1, 2025June 1, 2025 by Tom

“How can I check the data provided by users, is there a way to validate input in Power Automate flows?”


Few weeks ago I published an article on improving the JSON schema to make the ‘Parse JSON’ action more powerful. It was mostly about the output of the action, to reduce the mess it creates, to make the outputs easier to use. But that’s not all, there’s another feature you can use in your flows – input validation. Not only do you define the JSON structure with the schema, you can add validation on the values too!

Let’s use the following JSON in the examples:

{
  "Created": "2025-04-17T20:24:23",
  "IsCurrentVersion": false,
  "VersionId": 3584,
  "Title": "Item title new version"
}

If you use it in the ‘Parse JSON’ as a sample, you’ll get the schema below – it’ll be used in all the examples.

{
  "type": "object",
  "properties": {
    "Created": {
      "type": "string"
    },
    "IsCurrentVersion": {
      "type": "boolean"
    },
    "VersionId": {
      "type": "integer"
    },
    "Title": {
      "type": "string"
    }
  }
}

Property types

You can already see in the schema that every property has a “type”. That’s the first validation you can use – if the data you get is of a wrong type, ‘Parse JSON’ will fail. For example, if the type should be a number (integer) and you get a text (string) instead.

validate input in power automate
validate input type in power automate

The supported types are:

null
boolean
object
array
number (includes decimal spaces)
integer (whole number)
string

Required properties

Next, the properties the input JSON must always contain – these are defined in the “required” array. To make e.g. Title required, add the property ‘Title’ into ‘required’ array after the list of the properties.

{
  "type": "object",
  "properties": {
    "Created": {
      "type": "string"
    },
    "IsCurrentVersion": {
      "type": "boolean"
    },
    "VersionId": {
      "type": "integer"
    },
    "Title": {
      "type": "string"
    }
  },
    "required": [
    "Title"
  ]
}

If there’s no Title the ‘Parse JSON’ will fail.

Size of numbers / integers

If you’re working with numbers or integers, you can limit a range they can have using the ‘minimum’ and ‘maximum’ property, e.g.

{
  "type": "object",
  "properties": {
    "Created": {
      "type": "string"
    },
    "IsCurrentVersion": {
      "type": "boolean"
    },
    "VersionId": {
      "type": "integer",
      "minimum": 0,
      "maximum": 40
    },
    "Title": {
      "type": "string"
    }
  }
}

Similarly, you can use the ‘multipleOf’ property to confirm that the input number is divisible by that number.

Length of a string

Similarly, you can define how many characters can the string have with the ‘minLength’ and ‘maxLength’ properties.

{
  "type": "object",
  "properties": {
    "Created": {
      "type": "string"
    },
    "IsCurrentVersion": {
      "type": "boolean"
    },
    "VersionId": {
      "type": "integer"
    },
    "Title": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    }
  }
}

Special formats

As you probably noticed, there are not many supported types, most of the standards you’re used to being just a ‘string’. That’s why there’s another property to use – format.

Date formats

To validate that the string input is a date, you can use ‘date’ or ‘date-time’ as the ‘format’, e.g.

{
  "type": "object",
  "properties": {
    "Created": {
      "type": "string",
      "format": "date-time"
    },
    "IsCurrentVersion": {
      "type": "boolean"
    },
    "VersionId": {
      "type": "integer"
    },
    "Title": {
      "type": "string"
    }
  }
}
validate date in power automate

Email address

If you’re expecting an email address, you can use the ’email’ format.

{
  "type": "object",
  "properties": {
    "Created": {
      "type": "string"
    },
    "IsCurrentVersion": {
      "type": "boolean"
    },
    "VersionId": {
      "type": "integer"
    },
    "Title": {
      "type": "string",
      "format": "email"
    }
  }
}
validate email in power automate

Additional technical formats

There’re also a few technical formats you can use in the schema, for example:

uri         - string is a web address
ipv4 / ipv6 - string is an IP address
hostname    - string is a hostname

Summary

As you can see, the JSON schema can be a great help if you need to validate input in Power Automate flows. Not only does it strictly follow the input data types, you can add additional validation too – mandatory fields, their size, even a few special formats of a string. An extra line in the JSON schema can replace the hours spent building your own validation process.

If you’d like to learn even more about the JSON schema here’s a documentation to read through.


πŸš€ Master Power Automate

Join 2,100+ professionals getting actionable Power Automate tutorials, solutions, cheat sheets & tips every week.

No spam. Unsubscribe anytime.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

πŸš€ Master Power Automate

Join 2,100+ professionals getting actionable Power Automate tutorials, solutions, cheat sheets & tips every week.

No spam. Unsubscribe anytime.

Still exchanging emails to get things approved?

Get the Approval Process solution to skip the hard part and deploy an automated, fully functional approval solution on a SharePoint list in minutes! And then the next one, and the next one...

Approval Template Preview ✨ Learn more ✨

Are your approvals stuck due to unavailable approvers?

Keep your approvals running with the Approval task delegation app! Reassign any existing approval task to another user with a single click - no more waiting for absent approvers!

Power Automate approval task delegation ✨ Learn more ✨

Turn ideas into flows with ease!

Grab the complete Power Automate Cheat Sheet Bundleβ€”everything you need to master expressions, SharePoint HTTP calls, and Graph API in Power Automate.

Cheat Sheet Bundle Preview ✨ Get the Cheat Sheets

Didn't find what you were looking for?
Need to adjust a solution to fit your needs?
Or would you just like to get an assistance from somebody with thousands of hours of experience with Power Automate?

Power Automate blogs worth visiting

Damien Bird
Dennis (Expiscornovus)
Paul Murana

©2025 Let's POWER Automate | Theme by SuperbThemes