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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Power Apps form, Send ...
Power Apps
Unanswered

Power Apps form, Send an Email using button [Save as Draft]

(0) ShareShare
ReportReport
Posted on by
Hi Members,
 
In Power Apps, I am building a form with a 'Save as Draft' functionality. When the user clicks the 'Save as Draft' button, the form data should be saved to a SharePoint list with the status set as 'Draft'.
 
Also, an email should be sent to the user confirming that their draft has been saved successfully, including a link to the Power Apps edit form. Upon clicking the link, the app should open the form in edit mode, allowing the user to continue working on the item they have saved."

To do that, 
 
On the App.OnStart property = 
Set(var_ItemID, Value(Param("ID")));
Set(var_Item, If(!IsBlank(var_ItemID), LookUp(DataSource, ID = var_ItemID), Defaults(DataSource)));
 Form DefaultMode property = 
If(!IsBlank(var_ItemID), FormMode.Edit, FormMode.New)
Form Item property = 
var_Item
Button [Save as Draft] OnSelect property
 
Set(var_Submit,false);

// Submit the form
SubmitForm(Form1);
If(
    Form1.Valid,
    Set(
        var_ItemID,
        Form1.LastSubmit.ID
    );
    Set(
        var_ItemLink,
        "https://apps.powerapps.com/play/{AppID}?tenantId={TenantID}&ID="&var_ItemID
    );
    Office365Outlook.SendEmailV2(
        User().Email,
        "Draft Saved Successfully",
        "Hello, your draft has been saved successfully. Click the link below to edit your draft: " & "<a href='" & var_ItemLink & "'>Edit Your Draft</a>",
        {IsHtml: true}
    );
    Notify(
        "Draft saved and email sent successfully.",
        NotificationType.Success
    )
);
ResetForm(Form1);
        

This was working fine in the morning; it was sending the email, and when the end user clicked on it, the app was opening the form in edit mode with the user-provided details.
 

Problem = 
 
Now the email is not being sent, and after trying multiple times, the email was sent once, but the data was not fetched.

Please help me out. If I am missing something or what. I stucked here. Please suggest me what I can work with!
Thanks in advance!
 
 
powerappserror.png
Categories:
  • timl Profile Picture
    37,420 Super User 2026 Season 2 on at
    Hi CU05121153-0
     
    I would suggest that you debug your app with the Monitor tool. 
     
    By doing this, you can try to verify if the call to Office365Outlook.SendEmailV2 is made, and to see any errors that might be occuring.
     
     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 248 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard