Wouldn’t it be great if you could call flows from a model driven app? Well you can , but it is not without its difficulties.
Some background
Table of Contents
It is easy to start flows from a Canvas app and actually Model driven apps aren’t much harder.
In my case I wanted to create a quote for an opportunity and the document generation told available just weren’t good enough. I wanted my quotes to look better. There are plenty of other processes that I could imagine I would want to start a flow from a model driven app for. But this is quite a nice example flow.
This Send quote flow will send me an email with all of the quote details coming from my opportunity, related account and order lines.
Quite quickly I created a flow that started with the When a record is selected.

Start flows from a model driven app
And then the Send quote options appeared right there with my opportunity in my model driven app.

I managed to run the flows and I got this great success message.

Then I started to make some changes to my flow and suddenly things went wrong.

And as a scrolled down that message and clicked on the show more details message there is a message that related to the trigger being incorrect.

Time:
Server/Client Correlation ID: 2733bc97-c17b-4751-9b18-e07da64b140e
x-ms-client-request-id (Client->Backend Request Header): 1947f358-8355-453c-a8f4-d730-e74bb6f8
Error: The input body for trigger ‘manual’ of type ‘Request’ did not match its schema definition. Error details: ‘Required properties are missing from object: value.’.
Whatever that is all about, it is not nice!
So I deleted the trigger and then re-added the trigger and fixed all the references to properties that came from my trigger and I managed to start my flow from my Model driven app once again.
Sometimes I can edit the flow 10 times without any problems and sometimes I have to re-update the trigger after every update. This seems to be a bit of an annoying bug. If you happen to find the same issue and you have a better workaround then please leave a comment below.
Model Driven Business Process Flows
In addition to the above method you can also create a flow that runs from the business process flow. All you need to do is add a flow step to your Business Process Flow and you can run your flow from there.

But the details on how to do flows from a model driven app in a Process Flow will be another post for another day.
Hi Pieter,
At first I also thought this is a bug, but I have found out that whenever I reference a form field in my flow, the shceme of the trigger action changes this field to “required” (you can verify it by “peeking code” in the trigger action), even if this field is not required in the CDS entity. And if I don’t supply a value for this field in runtime, I get this error.
The solution I have found is not to reference the fields from the triggerbody action in my flow, but instead, add a “get item” action as the first action in the flow (right after the trigger), and get the item with the same ID as the triggered item. Then, I reference whatever fields I need from the “get item” action, yet the trigger action scheme do not mark any field as required, and the error disappears.
Thanks Gil, that is actually what I have done and the problem has gone away. I just thought that it was temperamental thing.
Hi Pieter,
At first I also thought this is a bug, but I have found out that whenever I reference a form field in my flow, the shceme of the trigger action changes this field to “required” (you can verify it by “peeking code” in the trigger action), even if this field is not required in the CDS entity. And if I don’t supply a value for this field in runtime, I get this error.
The solution I have found is not to reference the fields from the triggerbody action in my flow, but instead, add a “get item” action as the first action in the flow (right after the trigger), and get the item with the same ID as the triggered item. Then, I reference whatever fields I need from the “get item” action, yet the trigger action scheme do not mark any field as required, and the error disappears.
Hi, i also experienced that, it is quite fragile. Also when you deploy a solution including such flow, to an other environment, it will break… I had to redo the flow as a solution
An other question : we have per user app plan licence, and flow isn’t apparently included, we needed to buy separated flow or M365 licence. Did you experience that ?
Thank you?
Hi Jeff, is your flow a Power App flow? Or is it a different type of flow.
Hi Pieter ,
Can you please provide the solution steps detailed
Which detail are you after? How far did you get in developing this?
Hi Pieter,
I am currently using a developmental environment and am waiting for licences to be purchased before I can test out additional users with different access privileges etc.
When creating a flow in an entity for selected records like this under the flow tab, will this appear for all users? We are only purchasing per app licences for our users – are these flows considered part of the same business solution and so are included in our app licensing? And do created flows appear for ALL users or just the user that created the flow?
Thanks in advance!
Hi Lewis,
The easiest way to sort this is by permissions. In your roles you can specify if people can run flows or not. So you could just not allow unlicensed users to run flows from Dynamics model driven apps.
Dear Pieter,
Thanks for your very interesting blog posts!
the Dataverse trigger (when a record is selected) you use here, got deprecated. how do you work around this with the new Dataverse trigger (create, update, delete)? Can’t get my head around it… thanks for your help!
Hi Raphael,
I’m using Business Process flows to call my flows nowadays.
Hi! I have model driven app and I have created the flow, but my app doesn’t see it. Is it must be configured to allow app use that flow? In canvas app it need to be added to the app by “+ add flow” in edit preview, but I don’t have that button in my model driven app.
HI Monica the easiest way to add a flow to the Model driven app is by creating a business process flow. There you can add a flow.