cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
jrojas
Level: Powered On

Send email with information from completed form

I have created an Inspection App. 

In my first screen I have a gallery and a form, where you click the item in the gallery and view all the submitted information in the form. 

I am trying to add the option to email any selected item, is this possible? 

 

2 REPLIES 2
shailendra74
Level 10

Re: Send email with information from completed form

Hi @jrojas 

 

Yes it is possible.  Refer to below link for details to send email

 

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/connections/connection-office365-outloo...

 

You can implement in either way:

Place a button in the template of your gallery and onSelect you can send mail

or

Place a button on the form to send mail after going through the details of the form.

 

 

Thanks.

Super User
Super User

Re: Send email with information from completed form

Yes, you can use Office365.SendEmail or Office365SendEmailV2.    Basic syntax is:
Office365.SendEmailV2(To, Subject, Body) with slight variations between the original and V2


Body of the message can use HTML and incorporate data from your form.  Here's an example from one of mine where I collect the email address to send to from a form and gather the information for the body from a gallery I have previously built.  

Set(
    HTMLEmail,
    "<b><font size = 5>Accomplishments and Next Week for " & ddANSDept.Selected.Title & " (" & LookUp(
        Department,
        Title = ddANSDept.Selected.Title
    ).LTOwner.DisplayName & ") for week ended " & dpWeekEndDate.SelectedDate & "</b></font>" & 
    Concat(
        galLMV_1.AllItems,
        If(!IsBlank(galLMVProject_1),"<b><font size=4><br><br>" & galLMVProject_1 & "</font></b><br>", "") & 
        If(
            butLMVMS_1.Text = "Accomplishments", "<b><u>" & butLMVMS_1.Text & "</b></u>",
            butLMVMS_1.Text = "Next Week",      "<br><b><u>" & butLMVMS_1.Text & "</b></u>",
            IsBlank(butLMVMS_1.Text),"",         "&nbsp;&nbsp;&nbsp;<li>" & butLMVMS_1.Text & "</li>"
        )
    )
);
Office365.SendEmailV2(
    tiANSEmail,
    "Accomplishments and Next Week Report",
    HTMLEmail,
    {Importance: Normal}
)

Depending on the circumstances under which you want to send the email, you could do so from either the On Success or On Failure action of the form.

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

Top Kudoed Authors
Users Online
Currently online: 4 members 3,688 guests
Please welcome our newest community members: