“When a record is selected” trigger error in Power Automate

Posted by

“When a record is selected” trigger is a wonderful things that allows you to run flows on one or several records as selected by a user. In addition to that, these flows also run in that user’s context – so all connections would be established under that user.

However, in some scenarios, when I tried to run the flow on some records I got this not particularly helpful error. As you may guessed, “try again after some time” didn’t help. This flow didn’t run, so it failed before then.

So, the trick that worked for some other places across Power Platform is to look under the hood, in the browser console. Just open your “Developer tools” or inspect the page and look into browser’s console messages. You can see something like this:

As you can see, in my case the hint was in the message “Expected String but got Null”. Apparently, the “When a record is selected” trigger defines a schema with some fields of the record and expect them to be all mandatory. It turned out that some records had Null values in the fields expected by the trigger to be populated. When I fixed the data, all worked smoothly.

P.S. I appreciate if you point me to the place where it explains how that schema of the trigger “When a record is selected” is defined and how can I make optional fields not expected by the trigger to be populated.

One comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s