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 / Sending emails upon su...
Power Apps
Unanswered

Sending emails upon success

(0) ShareShare
ReportReport
Posted on by 121
With the current code I have, is there a way to add code to send email to the person that updated the app?
 
 
 
If(
    IsBlank(DateValue1.SelectedDate) || IsBlank(DataCardValue16.Text),
    Notify("Please fill in all required fields.", NotificationType.Error),
    Notify("Form submitted successfully!", NotificationType.Success)
  
);
SubmitForm(EditForm1);(NotificationType.Success);
Categories:
I have the same question (0)
  • SaiRT14 Profile Picture
    1,990 Super User 2025 Season 2 on at
     
    Modify your existing code to trigger a flow that sends the email:
    If(
        IsBlank(DateValue1.SelectedDate) || IsBlank(DataCardValue16.Text),
        Notify("Please fill in all required fields.", NotificationType.Error),
        Notify("Form submitted successfully!", NotificationType.Success)
    );
    // Trigger Power Automate Flow to send email to the current user
    Set(varUserEmail, User().Email);  // Store the current user's email
    SubmitForm(EditForm1);
    // Call Power Automate flow to send an email
    'Send Email Flow'.Run(varUserEmail, "Subject of the email", "Body of the email");
    // Optional: You can customize the message further with dynamic content like form values
     
     
    Create a flow that accepts parameters (the email, subject, and body) and uses the "Send an email (V2)" action from Outlook or another email service you are using.
    set the flow trigger to be "PowerApps", and add actions to send the email. The parameters will be passed from Power Apps when the flow is triggered.
     
    pls try and let me know if you need more details.
     
    thanks.
  • Verified answer
    Pstork1 Profile Picture
    68,697 Most Valuable Professional on at
    If you add an Office365Outlook connection to your app you can send the email by making these changes to your code.
     
    If(
        IsBlank(DateValue1.SelectedDate) || IsBlank(DataCardValue16.Text),
        Notify("Please fill in all required fields.", NotificationType.Error),
        SubmitForm(EditForm1); Notify("Form submitted successfully!", NotificationType.Success);
            Office365Outlook.SendEmailV2(User().email,"subject line of the email","Body of the email you want to send");
      
    );
    

    ----------------------------------------------------------------------------------
    If this Post helped you, please click "Does this answer your question" and give it a like to help others in the community find the answer too!

    Paul Papanek Stork, MVP
    Blog: https://www.dontpapanic.com/blog
     
  • nleuck_101 Profile Picture
    429 on at
    You can connect to Outlook 365 as a data source. From there you can compose an email after your action takes place for example on a click of a button. Here's a link to a site but there are other good resources out there if you search "Office365Outlook send email v2 powerapps"

    http://powerappsguide.com/blog/post/email-how-to-send-emails-office-365-outlook-connector
  • Sonyat810 Profile Picture
    121 on at
    I am getting errors with the following:
     
     
     
  • nleuck_101 Profile Picture
    429 on at
    @Sonyat810

    You're missing your To part of the email.

  • Pstork1 Profile Picture
    68,697 Most Valuable Professional on at
    did you make sure to add the Office365Outlook connector?
     
    It works for me
     
  • Pstork1 Profile Picture
    68,697 Most Valuable Professional on at
    @nleuck_101 The User().Email is the To portion. He wants to send it to the person running the app.

    ----------------------------------------------------------------------------------
    If this Post helped you, please click "Does this answer your question" and give it a like to help others in the community find the answer too!

    Paul Papanek Stork, MVP
    Blog: https://www.dontpapanic.com/blog
     
  • Sonyat810 Profile Picture
    121 on at
    Yes, I added the connector. Would it have something to due with the total code:
     
     
  • Sonyat810 Profile Picture
    121 on at
    Ok. all the errors are gone except the closing:
     
  • Sonyat810 Profile Picture
    121 on at
    Thank you ALL for all your help! it works like a charm, I freaking love this forum. 

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 793 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 333 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard