Power Automate Approval Requests With Attachments Using Embedded Canvas App In Model Driven App Form


Hello Everyone,

In this article, we will learn how to build and embed the canvas app in model driven app form for sending approval requests with attachments.

Create Canvas app

The first step is to build the canvas app. For that, you need to login to make.powerapps.com and select the blank canvas app.

Note: It’s my first canvas app, so I will be taking baby steps and telling you the very basic instructions.😊

Now add the data source, or whatever table you want to connect with your app.

Now comes the design part. From the insert button, select the container and drop it onto the screen.

Note: Container actually makes it easier to design the layout of an app.

Now add rectangle component on the header. Edit the form component and connect edit form to the data. Here I've selected the same dataverse table.

Now edit the form and add the required table fields tot the form.

After adding the required fields search to the attachments field, add. The attachment field basically creates the notes in the ModelDrivenApp records with whatever you attach from canvas app. Also add one button on the form.

Now, for getting the ModelDrivenFormIntegeration control, embed your app on the ModelDriven app form so you can save the data added from the canvas app in a table.

Embed Canvas App to ModelDriven App Form

Copy the canvas app ID from the details page.

Now, open the form where you want to embed the app. Select the section and add the canvas app.

You must provide the canvas app ID that you copied from details page.

After embedding the canvas app on the model driven app form, ModelDrivenFormIntegeration control will be visible on the canvas app editor.

Add the following expression on the button.


in order to save the data from the canvas app in the dataverse table you are using.

Now it’s time to create the approval flow.

In my scenario, I’ve run my flow on the update of my approval request field. You can also directly call the flow using the canvas app button.

In second step of flow, I’ve initialized an array variable to obtain all the attachments from the notes of the record.

In the step shown above, I’ve updated the status of my record and have gotten the notes attached to that record.

In the above step, I appended all the notes attachments to the record to my array variable.

Next, add these attachments with approval.

Your flow is completed. Now run the approval request from model driven app using embedded canvas app.

The approver will receive the approval request with attachments.

That's it :).

I hope this post could be of any help. Thanks & Happy CRMing :)

Similar Articles