PowerApps send email on submit

In this PowerApps tutorial, We will discuss on PowerApps send email on submit. We will see, how to send an Email in PowerApps on the submit button. Also, by taking some simple scenarios, We will see these below things that are related to PowerApps Send Email as:

  • How to send an Email on Button click in PowerApps or PowerApps send an email on the button
  • Send email on button press in PowerApps
  • Send an email with a link in PowerApps
  • PowerApps add cc, bcc in email
  • PowerApps send an email with High/Normal/Low importance
  • How we can send email to multiple recipients in PowerApps
  • PowerApps send an email with an attachment
  • PowerApps send an email on submit
  • PowerApps send Html email
  • What is office365.sendemail PowerApps
  • How to send email to the current user in PowerApps
  • What is PowerApps send email function

PowerApps send email on Submit

  • In this example, We will see how we can send an email on button click in PowerApps. For this, I have a SharePoint list named Project Details. This list has some below columns with different Data types. Also, it has some records that look like below:
PowerApps send email on button
  • Create the Powerapps app from the SharePoint list. Go to Power Apps tab -> Select Create an app -> Provide the name for your new app.
  • As I have created the PowerApps app from the SharePoint list itself, that’s why I have three screens as “Browse Screen, Details Screen, and Edit Screen” like the below screenshot.
  • Here, I will use the Details screen to send the Email on button click in PowerApps.
PowerApps send email button
  • To send an email from PowerApps Button, First of all, we need to connect the Office 365 Outlook Data source connector.
  • Go to View tab -> Data sources -> Search Office 365 Outlook -> Add a new connection or an existing connection with your Office 365 credentials. Then the data source has been connected to the specific app as shown below.
PowerApps send an email on button
  • Next, go to the Details screen and add a new custom card below the screen. Not only the Details screen or form but also you can use the Edit screen or Edit form.
  • To add the custom card, select the Details form -> Go to the Properties pane -> Click on Edit from the Fields section -> Select (ellipses) -> Choose + Add a custom card as shown below. Then, a new Data card will add below in the form.
PowerApps send an email on button click
PowerApps send email on submit
  • Now, inside the new data card, Insert a Button (Insert -> Button) and set its Text property to Send an Email.
  • Select the button (Send an Email) and apply this below formula on its OnSelect property as:
OnSelect = Office365Outlook.SendEmail("preeti@xxxx.onmicrosoft.com", "Added New Project", "PowerApps Project has been added here")

Where,

  1. Office365Outlook.SendEmail() = This is the method that helps to send an email from Office365 Outlook
  2. “preeti@xxxx.onmicrosoft.com” = Provide the email address to whom you want to send the email
  3. “Added New Project” = Enter the Email Subject line here
  4. “PowerApps Project has been added here” = Enter the Email Body part here
PowerApps send email on button click
  • Now save and Preview (F5) the app. Click on the Button (Send an Email). Open the Office 365 Outlook Email (you should open the outlook whom you sent the email). Then you can see a new mail will be available in the mailbox as below.
PowerApps send an email
  • Next what I want to do is, I will specify the user email address in a text input and when I will press the button, then the mail will go to that specific person.
  • To do so, take a Text input control (Insert -> Input -> Text input) and remove its Default property to blank.
  • Select the text input control and set its HintText to “Enter Email Address Here“.
  • Select the Powerapps Button (Send an Email) and set this below formula on its OnSelect property as:
OnSelect = Office365Outlook.SendEmail(txtEmailAddress, "Added New Project", "PowerApps Project has been added here")

Where,

  1. txtEmailAddress = Text input control name
PowerApps send an email onsave
  • Now save and Preview (F5) the app. Provide the Email address of the user whom you want to send the email and then click on the Button (Send an Email). When you will open the Outlook, that specific person or user will receive the new Email on his/her mailbox,
PowerApps send email onsave
  • Suppose you want to mention any user email addresses in Cc or Bcc. Also, if you want to make Email importance as High, Normal, or Low, then you can use all these functionalities.
  • By default, this Office 365 Outlook method provides you with all these options. You just need to update the formula on Button’s OnSelect property as shown below.
PowerApps send email button click
  • When you will preview the app and click on the button (Send an Email), then the specific user will receive an email with the High importance.
PowerApps send email button

PowerApps send email on button press

Below I will take one scenario where I want to send an email to a specific user by pressing on a Button. Also, at the same time, I want to send some information that will be selected via a Powerapps combo box. Follow these below steps that I need to do:

  • On the Powerapps screen, Insert a Combo box (Insert -> Input -> Combo box).
  • Select the Combo box and set its Items property as:
Items = ["PowerApps", "Power BI", "Power Automate", "SharePoint Online"]
PowerApps send email on button press
  • Next, Insert a Button (Send Email) and apply this below formula on its OnSelect property as:
OnSelect = Office365Outlook.SendEmail("nancy@xxxx.onmicrosoft.com", "New Concept has been Added", "Concept: " & Concat(ComboBox1.SelectedItems,ThisRecord.Value))

Where,

  1. Concat = The Concat function concatenates a mix of individual strings
  2. ComboBox1 = Combo box control name
PowerApps send an email on button press
  • Now save and preview the app. Select one choice from the Combo box and hit the Send Email button. Then you can see a mail will get by the recipients as like the below screenshot.
PowerApps send email on the button press

PowerApps send email with link

Below we will see in Powerapps, how we can send an email with the link.

Suppose, you want to send a specific SharePoint item link details via Outlook Email, then you can write this below formula on Button’s (Send an Email) OnSelect property as:

OnSelect = Office365Outlook.SendEmail("Preeti@xxxx.onmicrosoft.com", "Added New Project", "PowerApps Project has been added here. This represents the Item link: " & ThisItem.'Link to item')

Refer the below screenshot.

PowerApps send email with link

When you will preview the app and click on the button, then the recipient will receive an email with the item link as shown below. If you will click on the link, then the link will open with the specific item details.

PowerApps send an email with link

PowerApps Add Cc, Bcc in email

Suppose you want to add Cc and Bcc user email addresses in the PowerApps Email. PowerApps Office 365 Outlook Sendmail method provides the Cc parameters and as well as the Bcc parameter by default. You can add multiple numbers of Cc and Bcc user addresses in the PowerApps email.

  • The below screenshot represents the custom Email screen where three text inputs are there named “Email“, “Subject” and “Body“. Also, one Send icon is there that helps to send the PowerApps email.
  • Select the Send icon and write the below formula on its OnSelect property as:
OnSelect = Office365Outlook.SendEmail(
    txtEmail,
    txtSubject,
    txtBody,
    {
        Cc: "Bijay@xxxxx.onmicrosoft.com",
        Bcc: "Nancy@xxxxx.onmicrosoft.com"
    }
)

Where,

  1. txtEmail = Email text input control name
  2. txtSubject = Subject text input control name
  3. txtBody = Body text input control name
PowerApps add cc bcc in email
  • Save and Preview the app. Provide Email address, Subject and Body. Click on the Send icon as shown below.
PowerApps send email with cc and bcc
  • Once you will check your Outlook email, then you will be received with a new email in your mailbox. Also, those users that you have mentioned in Cc and Bcc, they will also receive the mail at the same time.
PowerApps send email with cc bcc

PowerApps send an email with High/Normal/Low importance

Here we will see how we can set an email with different types of important parameters. There are three types of importance parameters available in the Powerapps Send email method as:

  1. High: If you want to send an email to a person and that is the highest priority, then in that case you can use the importance as High.
  2. Normal: If the email priority is normal, then in that case you can use the importance as Normal.
  3. Low: If the email priority is low, then you can use the importance as Low. Suppose, in the Email, if you will not set any importance parameter, then By default it will take as Low importance.

To set the importance as per your priority, apply this below formula on Send icon’s OnSelect property as:

OnSelect = Office365Outlook.SendEmail(
    txtEmail,
    txtSubject,
    txtBody,
    {
        Cc: "Bijay@xxxxx.onmicrosoft.com",
        Importance: "High"
    }
)

Where,

  • txtEmail, txtSubject, txtBody = Text input control name
PowerApps send an email with importance
  • Save and Preview the app. Provide the values to below fields (Email, Subject, Body) and press the send icon.
  • Open the Outlook email, you will be received a new Email with the High importance as like below screenshot.
PowerApps send an email with High importance

PowerApps send email to multiple recipients

Its a general question that how you can email to multiple people in PowerApps. You may think that there you can get one Cc or Bcc to work while using the Office365 Outlook connection. But you may think in the wrong way.
You can also email to multiple user accounts in Powerapps at a time.

To send an Email to multiple recipients in Powerapps, apply this below formula on Button’s OnSelect property as:

OnSelect = Office365Outlook.SendEmail("preeti@xxxx.onmicrosoft.com", "Added New Project", "PowerApps Project has been added here. This represents the Item link: " & ThisItem.'Link to item', {Cc:"nancy@xxxx.onmicrosoft.com"&";"&"bijay@xxxx.onmicrosoft.com", Importance:"Normal"})

You can refer the below screenshot.

PowerApps send email to multiple recipients

Once you will check the Outlook mail, then you can see the multiple user addresses in Cc (those you sent the mail) as like the below screenshot.

PowerApps send email to multiple recipients

PowerApps send email with attachment

  • Suppose in PowerApps, you want to send an important document or file while sending an email to a specific person. In this case, you can use the Attachment option (By default) that has been provided by the Office365 Outlook connection.
  • You can send an email with a single attachment file or multiple attachment files in PowerApps.
  • Also, if you are interested to know more details about the PowerApps send Email with attachment, then you can refer from this below link:

PowerApps Email Attachment Control – How to Use

PowerApps send email on submit

In this below example, We will see how we can send an email on the Submit button in PowerApps. For this, we will use Power Automate. This means the flow will trigger from the PowerApps itself bypassing the dynamic values. Follow these below steps to do so:

  • I have a SharePoint list named PowerApps Email that contains these below three fields as shown below.
PowerApps send email on submit
  • Create a Powerapps app from the SharePoint list itself. Once you will create the app, there will be three screens available in the app (Browse screen, Details screen, and Edit screen).
  • Go to the Edit screen, the screen will appear with these below fields.
  • Insert a Button and set its Text property to Send Email.
  • Now its time to add the Powerapps Flow. Select the Button (Send Email) -> go to the View tab -> Power Automate -> + Create a new flow.
PowerApps send email on submit button
  • When you will click on to create a new flow, the flow template page will appear. Select the template named Click a button in PowerApps to send an email.
PowerApps send an email on submit button
  • In the next page, Click on the Continue button as like below.
PowerApps send an email on submit
  • Once you will click on the continue, the below flow will appear. In the template, you can see bydefault the actions and values has been added automatically. So no need to do anything. If you want to rename the flow, then rename it and then save the flow.
PowerApps send an email submit
  • Next, come back to the PowerApps app. Select the Button (Send Email) and add the flow. To add the flow, go to Action -> Power Automate -> Click on the flow name (PowerApps send an email). Then the flow will be added to the selected button.
how to send email on submit button in PowerApps
  • After adding the flow on the button, it will appear with PowerAppssendanemail.Run() on its OnSelect property. Now, you need to apply the below formula as:
OnSelect = PowerAppssendanemail.Run(
    DataCardValue6,
    DataCardValue7,
    DataCardValue8
)

Where,

  1. PowerAppssendanemail = Flow name
  2. DataCardValue6 = User Email Address field Data card value
  3. DataCardValue7 = Subject field Data card value
  4. DataCardValue8 = Body field Data card value
how to send an email on submit button in PowerApps
  • Save and Preview the app. Enter the fields with dynamic values and then press the button (Send Email) to send the email.
  • Once you will check your Outlook, then you have received with a new mail in your mail box as like below.
PowerApps send email submit button

PowerApps send html email

Email reporting is the simplest and easiest way to share information from the PowerApps. You can send the email using the Office 365 Outlook connection. But you may think that what is PowerApps Send Html Email means and how you can use it in the PowerApps Canvas app.

PowerApps HTML Email means you can create a nice looking email report by using the HTML code. In this case, the Office365Outlook Data source Connector is the same, but in the formula, you will write the Email code using HTML.

By using HTML code, you can design your email screen as per your choice like you can give Font size, Font color, make a new line, etc.

Below I have explained a scenario that how you can send html email in PowerApps.

  • I have a SharePoint list named Customer Care Report Details. This list has these below columns with different data types as:
  1. Title: This is By default Single line of text data type
  2. Customer Care Report For: Single line of text data type
  3. Plot Number: Single line of text data type
  4. Bell Reference Number: Single line of text data type
  5. Customer Name: Single line of text data type
  6. Manager: Person data type
PowerApps send html email
  • Go to the Powerapps app and connect the Office365Outlook Data source connector. In the PowerApps Edit form, Insert a new custom data card and add a Button inside the card.
  • Select the Button (Send an Email) and apply this below formula on its OnSelect property as:
OnSelect = Office365Outlook.SendEmail(
    DataCardValue6.Selected.Email,
    "Customer Care Report for " & ThisItem.'Customer Care Report For' & " Plot " & ThisItem.'Plot Number' & " (Bell Ref: " & ThisItem.'Bell Reference Number' & ")",
    "<font size=10>New Customer Report</font><br> <b>Customer Name: </b>" & ThisItem.'Customer Name' & "<br><b>Title: </b>" & ThisItem.Title,
    {
        IsHtml: true,
        Importance: "High"
    }
)

Where,

  • DataCardValue6 = Manager field Data card value. The value or user address will take from the Manager field.
powerapps office 365 send email html
  • Save and Preview the app. Press the Button (Send an Email). The user address will take from the Manager field. When you will open the Outlook (Recipient), then the email will look like the below screenshot.
send HTML email in PowerApps
powerapps send email on submit

office365.sendemail PowerApps

  • As I looked and searched many posts, most of the people are using Office365 connector to work with the Office 365 Outlook. Similarly, to send an email to a particular user, they used Office365.SendEmail() method inside the Canvas app.
  • But now, as Powerapps has been updated with the latest version, So instead of using the Office365 connector, We are using the Office365Outlook connector data source. Similarly, to send an email to a specific user, we can use Office365Outlook.SendEmail() method inside the Canvas app.
  • To connect the Office 365 Outlook Data source to your app, you can follow this below steps as:
  1. On the Powerapps app, Go to View tab -> Data sources -> Search Office 365 Outlook -> Add a new connection or an existing connection with your Office 365 credentials. Then the data source will be connected to the specific app.
  2. If you will not connect the Office365Outlook connector Data source before sending the email to anyone, then it won’t work.
  3. Similarly, you can use the Outlook.com connector data source if you want to use a non-Office365 account (i.e., a free @hotmail.com or @outlook.com address). Below is the formula expression that you can use as:
'Outlook.com'.SendEmail("xxxx@corporate.com", "Send email from PowerApps", "Happy Birthday Wishes!!!")

PowerApps send email to current user

In this below example, We will see how to send an email to the current user in PowerApps.

I have a SharePoint list that has a column named Employee Name. This Employee Name column is a Person or Group Data type. I have an app that populates my SharePoint list using an Edit form.

On the Powerapps app, I would like to add a Button, so that when I will press it, an email will send to that specific person identified under the “Employee Name” field.

Below screenshot represents the Employee Name column that is present in the SharePoint list.

PowerApps send email to current user
PowerApps send email to current user

On the Powerapps Edit form, Add a Button (Send an Email) and apply this below formula on its OnSelect property as:

OnSelect = Office365Outlook.SendEmail(DataCardValue17.Selected.Email, "Added New Project", "PowerApps Project has been added here. This represents the Item link: " & ThisItem.'Link to item', {Importance:"High"})

Where,

  1. DataCardValue17 = Employee Name Data card value

When you will preview and press the button, it will take the user address directly from the Employee Name field.

PowerApps send email to the current user
send email from powerapps

Go to the Outlook Email, you will be recieved a new mail (with High importance) in your mail box as shown below.

PowerApps send email to the current users
PowerApps send email to current user

PowerApps send email function

Here we will see about the PowerApps send Email function and how we can use it in PowerApps.

  • As we know, In PowerApps, To send an Email to others, We can create our own custom form where we can connect the Office 365 Outlook data source and send the email as per our choices.
  • But by default, there is also an inbuilt PowerApps screen named Email that helps to send an email to others. This Email screen is present with a proper format having with all email functionalities.
  • To add the PowerApps Email screen, Go to Insert tab -> New screen -> Click on Email as like below.
PowerApps send email function
  • Once you will add the Email screen to the Powerapps app, the screen will appear with “To“, “Subject” and “Message” fields. Also, It has a Send icon that helps to send an email to others when you will press on it.
  • When you will select the send icon, you can see the below code that will be available by default on its OnSelect property as:
OnSelect = /*Create semicolon separated list of people to email, send the email, reset subject & message fields*/           
Set(_emailRecipientString, Concat(MyPeople, Mail & ";"));           
Office365Outlook.SendEmail(_emailRecipientString, TextEmailSubject1.Text, TextEmailMessage1.Text, {Importance:"Normal"});           
Reset(TextEmailSubject1);           
Reset(TextEmailMessage1);           
Clear(MyPeople)
PowerApps send email functions
powerapps send html email
  • Next, Save and Preview the app. Enter these below fields as:
  1. To: Provide the user Email Addresses those you want to send the email.
  2. Subject: Enter the Email subject line here.
  3. Message: It’s the Body part where you need to type the email message.
  • Once it is done, just click on the Send icon. Then the specific people will receive the email in their maibox.
PowerApps send an email function
powerapps send email on submit

Also, you may like these below Powerapps Tutorials:

In this PowerApps tutorial, We discussed how to send an Email in PowerApps. Also, we covered these below things as:

  • PowerApps send an email on the button
  • Send email on button press in PowerApps
  • Send an email with a link in PowerApps
  • PowerApps add cc, bcc in email
  • PowerApps send an email with High/Normal/Low importance
  • How we can send email to multiple recipients in PowerApps
  • PowerApps send an email with an attachment
  • PowerApps send an email on submit
  • PowerApps send Html email
  • What is office365.sendemail PowerApps
  • How to send email to the current user in PowerApps
  • PowerApps send email function
  • How do you get powerapps or powerautomate/flow to send an email to the CURRENT user, not a user pulled from a sharepoint list? Thanks.

  • Is we can get link of item when you creating new record . … Its only getting on edit screen …

  • >