In this article, I am going to explain how to send an email by clicking a button in PowerApps. Also, I will explain how to add office 365 as a connection in PowerApps, how to add Office 365 outlook as a data source to our PowerApps, how to Send Email in the PowerApps, and how to Send a link in email.
I am going to take an example form my previous article; let's find the steps ahead.
Step 1
Edit your previously built app (referring to my
previous article, and the “Steps to connect SharePoint List using Power Apps”).
Step 2
Open up the app and it will display Brose Screen1, then preview it. Click on an item in the Browse Gallery.
In this screen, you can add the control to send the email. To add the control, close that screen.
Step 3
From the left pane “Tree View” under the screens choose DetailScreen1. Click on Dropdown of DetailScreen1 and select DetailForm1. From the right pane of the screen select Edit Fields.
Step 4
When you click on Edit Fields it will display which fields are included in the DetailForm1. On the right corner, Select "+Add a Custom Card."
Step 5
Select the Custom Card, insert a button and rename its text as "Email a Link."
Step 6
On the top left corner Select File and click on Connections. Then it will open up in a separate window, as you need to add a new connection here. So click on "+New Connection", search for Office 365 Outlook in search bar and you will get Office 365 Outlook Connection.
The connection will be placed like this,
Step 7
After the Office 365 outlook connection is connected, then go over to your app with the right little back arrow. And next you have to add the data source. Click
on View and then select DataSource to add data source
Step 8
After adding the data source, click on " Email a link" button and select "onSelect" and write the formula to send an email link.
- Office365Outlook.SendEmail(
- DataCardValue5,
- "Registration to Online Courses",
- "Registration Completed Successfully"
- )
Then preview the app and click on Email a Link button to send an Email. Here is a snap of the email received in the said inbox.
Summary
In this article, we discussed how to connect with Office 365 Outlook to PowerApps. We learned the way to send an email with a button click and send a link in the email, set Bcc and set the importance to high in an email in PowerApps.
Thank you... I hope you enjoy reading this article.