Introduction In this article, I am going to explain how to send an email on a button click event in PowerApps through Microsoft Flow.

Overview

Create a button on the item details view screen.
Create a flow for sending an email with parameters on PowerApps button trigger.
Pass the required parameter values on button click in PowerApps.
Publish the app and click the button whenever you want to send an email.

Create a PowerApps for the desired list

I have created a Sample List here with the following 2 columns and data: (When you exit Classic Experience, you will get the options like Flow, PowerApps as below).

Create an app with Name Hello Crmonce

Now, add a button for sending the mail on clicking as below.

Procedure for adding a button.

Click on Button under Insert.

Then, name the button on text property as you want where I’m naming it as Run Flow.

The resulting screen is shown below.

Now the setup is completed in the app, let’s create a flow on the button click.

Procedure

Click on Button.

How To Trigger Flow’s Email On Button Click In PowerApps

Click on Power Automate Icon on the Right side.

Now the Data window appears, click on Add flow its will open a pop and click Create a new flow on it. It will take you to the Flow 

Now add the Send an email action after the immediate step of PowerApps.

Build the email with the details for TO, Subject, Body, etc. as you require.

Here, we can either mention the details directly or we can pass info from power apps.

Let’s give some of these directly, and have some of them pass from PowerApps as below.

Here, the To address is given directly as my name (Anish.b); while the subject and body are passing from PowerApps with the help of Ask in PowerApps as shown above.

After saving the flow, you will get a window as shown below.

Now, add this flow to the button. Let’s move to the app and add it on the click of the flow name and pass the required things within the button, as shown below.

I have passed the subject and body from the app as above.

From the picture,

“This subject is coming from app” is the static value passing for the subject.
“Hi, My name is”&Gallery2.Selected.Name&”From,”&Gallery1.Selected.Place.

Gallery2.Selected.Name AND Gallery2.Selected.Price are dynamic values

Let’s save the app, publish and send the email on click

Conclusion

This article showed us how to create flows, trigger them from PowerApps, and pass the dynamic values to flows.

For any Help or Queries Contact us on info@crmonce.com or +918096556344