This tutorial shows how to send emails using the MessageFlow REST API from an Power Apps without creating a custom connector. The integration uses a Power Automate flow triggered by PowerApps, which sends an HTTP POST request to the MessageFlow API.
If you are deploying MessageFlow through Azure Marketplace, you can find our Email API offer here:
👉 MessageFlow – Email API for Developers (See more here)
- MessageFlow account (Register here)
- API key with appropriate permissions (email)
- An Power Automate account
- Register: https://app.messageflow.com/register
- Confirm email and phone number
- Fill in company details and select services (Email)
- Navigate to the “Account”->“Settings”->“API” tab
- Click “New API Key”
- Name the key and set permissions, you need to select options “Transactional e-mail”
- Save the following values:
ApplicationKeyAuthorization
Keep your credentials secure — they will be needed in code!
If you received "Creating API keys impossible until account approved by customer service office" error it might be that your account has not yet been activated. If this process takes longer than 3 hours, please contact our support team to verify your identity.
To send emails we require two more things:
- domain in the FROM field must be verified. You can do this in “Email”->“Common settings”->“Senders authorization”. More information you can read here
- your personal "smtpAccount", you can get it from the MessageFlow application. Navigate to “Email”->“Email API”->“Settings”->“SMTP Accounts”
- Go to https://make.powerautomate.com
- Click "Create" from the left menu
- Select "Instant cloud flow"
- Name it "Send Email via MessageFlow REST API"
- Choose "PowerApps" as the trigger ("When Power Apps calls a flow (V2)")
- Click "Create"
-
In the flow editor, click on "When Power Apps calls a flow (V2)" action\
-
Add text inputs:
-
Name:
subject, Type:Text -
Name:
smtpAccount, Type:Text -
Name:
fromEmail, Type:Email -
Name:
fromName, Type:Text -
Name:
toEmail, Type:Email -
Name:
toName, Type:Text -
Name:
htmlContent, Type:Text -
Name:
textContent, Type:Text
This paameters list includes only the required fields: subject, smtpAccount, from, to, and content. If you want to add more fields, check the endpoint documentation here
-
-
On the Power Automate designer top toolbar, select "Save".
-
In the flow editor, click "Add a new step".
-
Select the "HTTP" action.
-
Configure the "HTTP" action as follows:
-
URI:
https://api.messageflow.com/v2.1/email -
Method:
POST -
Headers:
- Authorization:
replace-with-your-messageflow-authorization - Application-Key:
replace-with-your-messageflow-application-key - Content-Type:
application/json
- Authorization:
-
Body:
{ "subject": "", "smtpAccount": "", "from": { "email": "", "name": "" }, "to": [ { "email": "", "name": "" } ], "content": { "html": "", "text": "" } }Then in each parameter press the “/” key between "", select “Insert dynamic content,” and choose the appropriate inputs from the previous step.
or copy and paste this payload:
{ "subject": "@{triggerBody()?['text']}", "smtpAccount": "@{triggerBody()?['text_1']}", "from": { "email": "@{triggerBody()?['email']}", "name": "@{triggerBody()?['text_2']}" }, "to": [ { "email": "@{triggerBody()?['email_1']}", "name": "@{triggerBody()?['text_3']}" } ], "content": { "html": "@{triggerBody()?['text_4']}", "text": "@{triggerBody()?['text_5']}" } }
This payload includes only the required fields: subject, smtpAccount, from, to, and content. If you want to add more fields, check the endpoint documentation here
-
-
On the Power Automate designer top toolbar, select "Save".
-
On the designer canvas, select the + icon and selct "Add an action"
-
Search for "Parse JSON" and select it
-
In "Content", press the “/” key, select “Insert dynamic content,” and choose "Body" from the "HTTP action"
-
In "Schema" click "Use sample payload to generate schema", and paste this sample response:
{ "success": true, "message": "Email sent successfully", "response_content": { "uniqId": "12345", "status": "200" } }
-
On the Power Automate designer top toolbar, select "Save".
-
On the designer canvas, select the + icon and selct "Add an action"
-
Search for "Respond to a PowerApp or flow" and select it
-
Click "Add an output" and add two outputs:
- Name:
success, Type: "Yes/No", Value: press the “/” key, select “Insert dynamic content,” and choosesuccessfrom "Parse JSON" - Name:
message, Type: "Text", Value: press the “/” key, select “Insert dynamic content,” and choosemessagefrom "Parse JSON"
- Name:
-
On the Power Automate designer top toolbar, select "Save".
- Click "Test" in the top-right corner and choose "Manually".
- Provide sample values for each parameter to verify the flow works correctly.
- Created by: MessageFlow
MessageFlow is a developer-friendly communication platform designed to help teams deliver secure, high-quality transactional messaging at scale.
With our Email API you can:
- Send fast, reliable transactional emails from any system
- Track delivery, errors and engagement in real time
- Improve deliverability with verified domains and optimized infrastructure
- Simplify integration with transparent pricing and predictable performance.