Trigger a defined approval

Completed

Previously, you learned how to create a Contoso Coffee machine request and a simple approval workflow that, when triggered, sends an approval to you for approval. This module extends this functionality by using a Power Automate cloud flow to begin a business approval process when a machine request is created in Dataverse.

Note

If you’re not familiar with approvals in Power Automate, the Get started with approvals article provides some examples of what you can achieve with the standard Microsoft Power Platform Approvals Connector together with Power Automate. The Approvals Kit extends similar approval scenarios with extra features, as discussed in the following sections.

Example process

An example process involves a basic self-approval by using the Contoso Coffee scenario, where a request is triggered when new request data is added to Dataverse. Later modules extend this workflow where a second manager approval is requested when the value of the machine request is greater than USD 400.00.

You could build this combined scenario by using multiple Power Automate cloud flows, but this scenario can be time-consuming to develop. By using the Approvals Kit, you can model the same process quickly and then focus on setting up the business approvals process.

Workshop structure

The goal of this workshop is to incrementally build your knowledge of the Approvals Kit. The first module is intentionally basic to help you get familiar with the kit.

The Approvals Kit provides a no-code way of defining multistage approvals and conditions like the ones that the next unit covers.

Later modules of this workshop also demonstrate features, such as handling delegated approvals and out-of-office support, which help make building complicated approval processes even easier because you don’t need to build these features using Microsoft Power Platform solutions.

Note

If you want to explore this topic further, see the Approvals Kit Comparison documentation.

Create a solution

The first task is to create a Microsoft Power Platform solution to create a container so that you can group your related platform resources together.

Note

If you're new to the concept of solutions, the Solutions overview and Solution concepts articles provide further information.

  1. Sign in to Power Apps.

  2. Select the assigned Approvals Kit environment for this workshop content.

  3. Select Solutions from the left navigation pane. If the item isn’t in the left navigation pane, select ...More and then select Solutions.

  4. Select New Solution.

  5. Enter the solution display name of Contoso Coffee Approvals.

  6. Select Contoso as the publisher.

    For more information, see Solution publisher.

  7. Select Create.

  8. Wait for your solution to be created.

Create a cloud flow

In your created solution, complete these steps:

  1. Select New > Automation > Cloud flow > Automated.

    For more information, see Create a cloud flow in a solution.

  2. Enter Machine Request as the flow name.

  3. Search for a trigger by entering Dataverse to choose your trigger.

  4. Select the When a row is added, modified or deleted (Microsoft Dataverse) trigger.

  5. Select Create.

  6. Select Added from the Change type dropdown menu.

  7. Select Machine Orders from the Table name dropdown menu.

  8. Select the scope of the change, such as Organization. For more information, see Scope.

Note

For more information on Dataverse trigger parameters, see Trigger flows when a row is added, modified, or deleted.

Screenshot of Power Automate Dataverse trigger when Machine Order is Added.

  1. Select New Step.

  2. Select the Custom tab.

  3. Select the Start business approval process action.

Screenshot of adding the Approvals Kit start business approvals process inside a Power Automate cloud flow.

  1. Select Sign in if prompted and then select your account.

  2. If prompted, select Allow access to confirm creation of the Approvals Kit connection.

Screenshot of the Confirmation required prompt asking for approval to add the Approvals Kit connection.

  1. Select the Machine Requests (v1) workflow process that you published in the Create your first Approval Kit workflow unit.

Screenshot of adding the Approvals Kit connector with a selected workflow.

  1. The Request By must be a value email. You can select the Requested By from the Dynamic Content

  2. Select Save.

  3. Wait for the cloud flow to save.

Create a new machine request

Now that you’ve defined a cloud flow trigger for the Machine Order table, you can complete the following steps to create a new machine request that triggers an approval workflow.

  1. Select Apps and then select Machine Ordering App.

Screenshot of selecting Machine Ordering App in the Apps screen.

  1. If prompted, select Allow for the Office 365 Users connector.

Screenshot of the consent dialog for you to allow the Office 365 Users connector.

  1. Select a few machines and then select Compare.

Screenshot of the Machine Ordering app, showing multiple machines selected.

  1. Select one machine and then select Submit.

Screenshot of the Machine Ordering app, showing a machine selected and the Submit machine request option.

  1. Select OK to close the submitted machine request.

Screenshot of the Machine Ordering app, showing the machine request as successfully submitted.

  1. Close the application.

Approve the request

After you submit the machine request, the system triggers the cloud flow, which begins your defined business approval process. Use these steps to approve the request in the Power Automate portal.

Note

The exercises in this workshop are completed in the approval that’s available in the Power Automate portal. If the user is set up with an Office 365 license, the approval is also available through Outlook or in Microsoft Teams.

  1. Open the Power Automate portal.

  2. Select the assigned Approvals Kit environment for this workshop content.

  3. From the left navigation pane, select Approvals.

  4. Wait for the approval to be sent.

  5. Select the received approval.

  6. Select Approve.

Screenshot of the selected approval in the Power Automate portal.

  1. Select Confirm to approve the approval.

Screenshot of the Respond Approve dialog, showing the selected approval and the Confirm option to approve the approval.

  1. Select Done to close the approval after it’s confirmed.

View the completed approval

In this task, you use the Business Approval Management application of the Approvals Kit to view the updated status of the approved request.

  1. Select Solutions from the left navigation pane of the Power Automate web portal.

  2. Select Business Approval Kit from the list of solutions.

  3. Select Apps from the Objects navigation item.

  4. Select Business Approval Management from the list of apps.

  5. Select the ellipsis (...) menu next to the application name and then select Play.

  6. Select Approval Instances from the left navigation pane.

  7. Select the completed approval.

Screenshot of the Active Business Approval Instances view.

  1. Review the details and then notice that the Outcome field shows Approve.

Screenshot of the Business Approval Instance details view.

In this unit, you combined the Contoso Coffee Machine Request solution with the business approval that you created in the Create your first Approval Kit workflow unit. Additionally, you created a Power Automate cloud flow, combining a Dataverse trigger for the Machine Order table and the Approvals Kit connector to begin a selected business approval process.

You also used the Business Approval Manager application to view the results of the completed business approval. If you received an error in the process, or if the stage hasn’t been completed, the instance status would be Running or Error.