web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Send Email via Flow if...
Power Apps
Unanswered

Send Email via Flow if Checkbox is ticked in PowerApps

(1) ShareShare
ReportReport
Posted on by 175
Hi Team,

I have created a datasource using MS Ex.cel Online.

Below is a screenshot of the form (Form1) that I have created in Powerapps.

 

So, what I need is : 

1. If I have clicked on the checkbox, and then click the button to submit the record, and automated email that is created in Ms Flow should be sent.

2. It should take the email from the record (vikna@abc.com) and this record should be in the "To" column in the email.

 

Is it possible to do this?

 

vikna_0-1691278924475.png

 

 

Categories:
I have the same question (0)
  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @vikna 

    Sure, it's absolutely possible to do this.

    You will want to integrate Power Automate with Power Apps Canvas App to trigger the email whenever the checkbox is checked and the button is clicked.

     

    Here's how you can accomplish this:

    1. Creating a Power Automate Flow:

    - Go to Power Automate and click on "Create" > "Instant flow".
    - Name your flow and choose the "Power Apps" trigger, then click "Create".
    - Next, add a new action called "Send an email (V2)" under the "Office 365 Outlook" connector.
    - In the "To" field, click on "Ask in Power Apps" to make this dynamic.

    Similarly, do this for the "Subject" and "Body" fields as well if you want them to be dynamic.
    - If using Power Apps(V2) you instead add parameters  by clicking Add an input at the top instead

    poweractivate_0-1691258601481.png- Add at least one "Respond to a PowerApp or flow" block in your Flow if you want Power Apps Canvas App to WAIT for the Flow to complete before moving on to the next part of your formula. 

    poweractivate_0-1691285784511.png

    Otherwise leave it out if you DON'T want the Canvas App to wait for the Flow to complete before moving on to the next part of your formula. 

     

    - Save your Flow.

    2. Integrating Power Automate with Power Apps:

    - Go back to Power Apps and select the button that submits the record.
    - In the formula bar, enter the following:

     

    If(
     Checkbox1.Value = true,
     'YourFlowName'.Run(TextInputEmail.Text, TextInputSubject.Text, TextInputBody.Text)
    );
    SubmitForm(Form1)
    

     

    Where 'YourFlowName' is the name of the Power Automate flow you created, and TextInputEmail.Text, TextInputSubject.Text, TextInputBody.Text are the text inputs in your form from which you are getting the email, subject, and body of your email. Make sure to replace these with your actual control names.

     

    In this formula example, the If function checks if the checkbox (named Checkbox1 here) is checked. If it's true, then it runs the flow, passing in the email, subject, and body. After that, it submits the form regardless of the checkbox's value.

     

    Remember, this formula example assumes that you have a valid email address, subject, and body in the respective fields of your form. If they are not valid, you should add error checking to handle this.

     

    If you want Power Apps to wait for the flow to finish before submitting the Form, you need to add at least one "Respond to a PowerApp or Flow" action in your flow. If you don't include this action, Power Apps won't wait for the flow to finish in our "run" formula, before moving on to the next action to Submit the form!

     

    It is not necessary to even use the return value in Canvas App or for this block to be actually hit in the Flow, it simply must be present somewhere in the Flow at least once, to signal whether you want Power Apps Canvas App to wait for the Flow to complete or not. When it's not present it will not wait. If at least one is present, then it should wait.

     

    Hope it helps @vikna 

  • Verified answer
    vikna Profile Picture
    175 on at

    hi @poweractivate 

    apologies for the delayed response.

    I have managed to find another solution as below and it worked.

     

    Hi @v-qiaqi-msft ,

    Thank you so much for the reply.

     

    I used the below method to achieve what I wanted

    ====================================================================

    If(Tgl_FeedbackEmail.Value = true,
    Office365Outlook.SendEmailV2(
    EmailAddress.Text , // Replace with the email address you want to send the email to
    DataCardValue8 & " : Request for Feedback - IT **************", // Replace with your email subject

    "<html><body>" &
    "<p>Hi " & GivenName.Text & ",</p>" &
    "<p>We hope you had a positive experience at ************************.</p>" &
    "<p>Your feedback is vital to us.</p>" &
    "<p>Kindly spare a moment to share your thoughts, helping us enhance our services.</p>" &
    "<p>Thank you for your valuable input.</p></p>" &
    "</body></html>"
    )
    );

    SubmitForm(Form1);

    ========================================================================

     

     

    Thank you so much for your advise though. 🙂

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard