Call The Workflow From PowerApps (Send Email Through PowerApps)

Problem Statment

Send an Email using PowerApps and PowerAutomate.

Solution

  1. Create UI in PowerApps
  2. Create Power Automate Instant workflow with trigger 'PowerApps' - ask for Parameters from PowerApps
  3. Add Workflow to PowerApps and pass the Parameters and test the workflow

Step 1 - Create Power Automate Instant workflow with trigger 'PowerApps'

Call the workflow from PowerApps (Send Email Through PowerApps)Call the workflow from PowerApps (Send Email Through PowerApps)

Add three "Compose" actions to get inputs from PowerApps (See screenshot below)

  1. Subject - Subject of the Email
  2. Body - Body of the Email
  3. To - Name of the person to whom you wish to send the email

Call the workflow from PowerApps (Send Email Through PowerApps)

Add Send an Email Action below the third compose

Provide outputs of all above three compose actions as Input to particular field (Subject, Body, and CC)

Call the workflow from PowerApps (Send Email Through PowerApps)

Step 2

Create PowerApp and add three lables and two Textbox and one Combobox for People Picker as shown below Screenshot.

For combobox you have to add Office365Users from database,

Call the workflow from PowerApps (Send Email Through PowerApps)

Items property of Combobox - Office365Users.SearchUser({searchTerm:cbpeoplepicket.SearchText,top:10})

Call the workflow from PowerApps (Send Email Through PowerApps)

Next add the workflow created in first step to the PowerApps from left pane as shown in below screenshot

(Here in this example the flow name is "FromPowerApp")

Call the workflow from PowerApps (Send Email Through PowerApps)

After Adding the workflow you can call the workflow on "OnSelect" property of Send button - Pass the three parameters

FromPowerApp.Run(txtsubject,txtbody,cbpeoplepicket.Selected.Mail)

Refer below screenshot,

Call the workflow from PowerApps (Send Email Through PowerApps)

Now you will be able to run the app and send the email using PowerApps and Power Automate

Keep Coding. Keep Growing.....:)


Similar Articles