Practice Lab 5 – Button flow

In this lab you will create a button flow.

What you will learn

  • How to create a Power Automate instant button flow

High-level lab steps

  • Create a button flow
  • Use trigger tokens
  • Add user input
  • Test the flow

Prerequisites

  • Must have completed Lab 2: Data model

Detailed steps

Exercise 1 – Create button flow

Task 1.1 - Create the trigger

  1. Navigate to the Power Automate portal https://make.powerautomate.com

  2. Make sure you are in the Dev One environment.

  3. Select the + Create tab from the left-side menu.

  4. Select Instant cloud flow.

  5. Enter Create opportunity for Flow name.

  6. Select Manually trigger a flow.

  7. Select Create.

Task 1.2 - Add user input

  1. Select the Manually trigger a flow step.

  2. Select the Manually trigger a flow step name and enter Button triggered

  3. Select Add an input.

  4. Select Text.

  5. Enter Customer Name in Input.

  6. Enter Please enter the customer name in Please enter your input.

  7. Select Add an input.

  8. Select Text

  9. Enter Comments in Input.

  10. Enter Any comments in Please enter your input.

  11. Select Add an input.

  12. Select Number

  13. Enter Potential Sale in Number.

    Screenshot of user input.

Task 1.3 - Add create opportunity action

  1. Select the + icon under the trigger step and select Add an action.

  2. Enter add row in search.

  3. Select Add a new row under Microsoft Dataverse.

  4. Enter Dataverse for Connection name.

  5. Select Sign in

  6. Use your tenant credentials.

  7. Select Add a new row step name and enter New opportunity.

  8. Select Opportunities for Table Name.

  9. Enter / into the Customer field and select Insert dynamic content, select See more.

  10. Select Customer Name.

  11. Select Owner Name field and enter MOD Administrator

  12. Select Show all.

  13. Select Opportunity Subject field and enter New opportunity

  14. Enter / into the Amount field and select Insert dynamic content.

  15. Select Potential Sale.

  16. Select Notes field and select the Dynamic content icon and select See more.

  17. Select Comments.

  18. Enter / into the Estimated Close Date field and select Insert expression.

  19. Enter the expression utcNow() and select Add.

    Screenshot of new opportunity action.

  20. Select Save.

Exercise 2 – Test button flow

Task 2.1 - Run button flow

  1. Select Test

  2. Select Manually.

  3. Select Test.

    Screenshot of testing button flow.

  4. Enter the following details:

    1. Customer Name=Button test
    2. Comments=This is a test
    3. Potential Sale=9999
  5. Select Run flow.

  6. Select Done.

  7. Select the <- Back button from the top left of the command bar.

Task 2.2 - Verify opportunity record created

  1. Navigate to the Power Apps Maker portal https://make.powerapps.com

  2. Make sure you are in the Dev One environment.

  3. In the left navigation pane, select Tables.

  4. Select Opportunity.