Problem Statment
Send an Email using PowerApps and PowerAutomate.
Solution
- Create UI in PowerApps
- Create Power Automate Instant workflow with trigger 'PowerApps' - ask for Parameters from PowerApps
- Add Workflow to PowerApps and pass the Parameters and test the workflow
Step 1 - Create Power Automate Instant workflow with trigger 'PowerApps'
Add three "Compose" actions to get inputs from PowerApps (See screenshot below)
- Subject - Subject of the Email
- Body - Body of the Email
- To - Name of the person to whom you wish to send the email
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)
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,
Items property of Combobox - Office365Users.SearchUser({searchTerm:cbpeoplepicket.SearchText,top:10})
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")
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,
Now you will be able to run the app and send the email using PowerApps and Power Automate
Keep Coding. Keep Growing.....:)