Showing results for 
Search instead for 
Did you mean: 
Helper IV
Helper IV

How to send Email using Web API in PowerApps Portal


Can I send email in background by passing parameters like receiver email id , subject , body text using below method

Solution Sage
Solution Sage

Hi @Dhananjay_Patil 

As I understand, you want to send an email from PowerApps Portal. 

The link which you have provided is for Dynamics 365, not for PowerApps Portal.


Can you explain your requirement in details? So, some one can help you.

Like, you want to send an email on create of record or on click of custom button, etc.

Hi @hardikv 

Yes I want to send email in background from PowerApps Portal

My Details Requirement is as below

1. If user A added  some records from portal  then I want to send email to Users X and User Y
2. If user B added some records from portal then I want to send email to User P and User Q

So I am looking for such solution that I will pass parameters to any function/Web API like receiver email, subject , email body and mail will be send to that users in background

Hello @hardikv 

Can I reference bellow link for adding record in Email entity using web API and Create action

While calling API all parameters will be send like 'to', 'from', 'subject' , 'message'

Hi @Dhananjay_Patil 


You can achieve your requirement using Http Trigger method PowerAutomate.

Please refer below blogs to create Power Automate:


After creation of power automate, you will get HTTP POST URL. Then you can add that url in httpTriggerUrl variable in below code.

function sendEmail(){
    var objEmail = {};

    objEmail.subject = "This is subject"; = "";
    objEmail.body = "This is body";

    var stringJSON = JSON.stringify(objEmail);

    var httpTriggerUrl = "";
        type: "POST",
        contentType: "application/json; charset=utf-8",
        datatype: "json",
        url: httpTriggerUrl,
        data: stringJSON,
        async: true,
        beforeSend: function (XmlHttpRequest) {
            XmlHttpRequest.setRequestHeader("Accept", "application/json");
            XmlHttpRequest.setRequestHeader("Content-Type", "application/json; charset=utf-8");
            XmlHttpRequest.setRequestHeader("OData-MaxVersion", "4.0");
            XmlHttpRequest.setRequestHeader("OData-Version", "4.0");
        success: function (data, textStatus, XmlHttpRequest) {
        error: function (xmlHttpRequest, textStatus, errorThrown) {


You have to add this code in Page's localized content. You also have to add button in your web page.

<button onclick="sendEmail();">Send Email</button>


If you like this post, give a Thumbs up. Where it solved your query, Mark as a Solution so it can help other people!

Helpful resources

PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,610)