Mailgun (Preview)
Mailgun provides powerful APIs to send, receive, track, and store email. Use this connector to automate email delivery and communication workflows without writing code.
This connector is available in the following products and regions:
| Service | Class | Regions |
|---|---|---|
| Copilot Studio | Premium | All Power Automate regions except the following: - US Government (GCC) - US Government (GCC High) - China Cloud operated by 21Vianet - US Department of Defense (DoD) |
| Logic Apps | Standard | All Logic Apps regions except the following: - Azure Government regions - Azure China regions - US Department of Defense (DoD) |
| Power Apps | Premium | All Power Apps regions except the following: - US Government (GCC) - US Government (GCC High) - China Cloud operated by 21Vianet - US Department of Defense (DoD) |
| Power Automate | Premium | All Power Automate regions except the following: - US Government (GCC) - US Government (GCC High) - China Cloud operated by 21Vianet - US Department of Defense (DoD) |
| Contact | |
|---|---|
| Name | Support channel |
| URL | https://help.mailgun.com/hc/en-us |
| support@mailgun.com |
| Connector Metadata | |
|---|---|
| Publisher | Sinch Sweden AB |
| Website | https://www.mailgun.com |
| Privacy policy | https://www.mailgun.com/legal/privacy-policy/ |
| Categories | Marketing;Sales and CRM |
Connector name
Mailgun
Connector summary
The Mailgun connector lets Power Automate users send email, retrieve Mailgun domain information, validate individual email addresses, submit bulk email validation jobs, and retrieve bulk validation results using their Mailgun account.
Contact
Contact URL: https://help.mailgun.com/hc/en-us
Support/contact email: support@mailgun.com
Signup URL: https://signup.mailgun.com/
Requirements
- A Mailgun account. If you do not have one, sign up at https://signup.mailgun.com/.
- A Mailgun API key or domain sending key.
- The correct Mailgun API region for your account: US or EU.
- For sending email, a Mailgun sending domain. Production sending requires a verified domain.
- For validation actions, access to Mailgun Validate.
Sandbox domains can be used for initial testing, but are limited to authorized recipients.
How to get credentials
This connector uses Mailgun API key authentication. Sign in to the Mailgun Control Panel and create an API key from API Security, or create a domain-specific Sending API Key from your sending domain settings.
The connector uses Basic authentication with api as the username and the Mailgun API key as the password. During connection setup, select the Mailgun API region that matches your account.
Supported Operations
This connector supports the following operations:
Send Email: Send an email using a Mailgun sending domain.Get Domain Information: Retrieve Mailgun domain information.Validate Email Address: Validate an individual email address.Submit Bulk Validation Job: Submit a bulk email validation job.Get Bulk Validation Results: Retrieve bulk email validation results.
Creating a connection
The connector supports the following authentication types:
| Default | Parameters for creating connection. | All regions | Not shareable |
Default
Applicable: All regions
Parameters for creating connection.
This is not shareable connection. If the power app is shared with another user, another user will be prompted to create new connection explicitly.
| Name | Type | Description | Required |
|---|---|---|---|
| API key | securestring | The Mailgun private API key | True |
| Mailgun region | string | Select Mailgun US or Mailgun EU | True |
Actions
| Bulk Email Validation |
Upload a CSV with an email header column and start a bulk validation job using Mailgun's V4 API. |
| Get Bulk Validation Results |
Retrieves bulk validation job status and summary results for a previously submitted job. |
| Get domain details |
Fetches JSON representation of a domain that includes details about the domain's state and settings. |
| Get domains |
Get the list of domains. Can be filtered by state or authority. The list is paginated and limited to 1000 items per page. |
| Send an email |
Sends an email using your Mailgun account via multipart form fields compatible with Mailgun's messages API. |
| Validate Email |
Validates an email address using Mailgun's validation service and returns deliverability results. |
Bulk Email Validation
Upload a CSV with an email header column and start a bulk validation job using Mailgun's V4 API.
Parameters
| Name | Key | Required | Type | Description |
|---|---|---|---|---|
|
Job List Name
|
list_id | True | string |
Path parameter that identifies the bulk validation job. |
|
CSV File
|
file | True | file |
CSV file to upload. The file must include a header named email. |
Returns
| Name | Path | Type | Description |
|---|---|---|---|
|
Job ID (List Name)
|
id | string |
Job identifier (list name) |
|
Server Message
|
message | string |
Status message from Mailgun |
Get Bulk Validation Results
Retrieves bulk validation job status and summary results for a previously submitted job.
Parameters
| Name | Key | Required | Type | Description |
|---|---|---|---|---|
|
Job ID
|
list_id | True | string |
The job identifier returned from the bulk validation request. |
Returns
| Name | Path | Type | Description |
|---|---|---|---|
|
Job ID
|
id | string |
Job identifier |
|
Job ID
|
list_id | string |
Job list name |
|
Job Status
|
status | string |
Current job status |
|
Created At
|
created_at | integer |
When the job was created (Unix timestamp) |
|
CSV Download URL
|
download_url.csv | string |
URL to download all results as a CSV file |
|
Curated CSV Download URL
|
download_url.curated_csv | string |
URL to download curated results as a CSV file |
|
JSON Download URL
|
download_url.json | string |
URL to download all results as a JSON file |
|
Curated JSON Download URL
|
download_url.curated_json | string |
URL to download curated results as a JSON file |
|
Total Quantity
|
quantity | integer |
Total number of records in the job |
|
Records Processed
|
records_processed | integer |
Number of records processed so far |
|
Deliverable Count
|
summary.result.deliverable | integer |
Number of deliverable addresses |
|
Undeliverable Count
|
summary.result.undeliverable | integer |
Number of undeliverable addresses |
|
Catch All Count
|
summary.result.catch_all | integer |
Number of catch-all addresses |
|
Do Not Send Count
|
summary.result.do_not_send | integer |
Number of addresses flagged as do not send |
|
Accept All Count
|
summary.result.accept_all | integer |
Number of accept-all addresses |
|
Unknown Count
|
summary.result.unknown | integer |
Number of addresses with unknown deliverability |
|
High Risk Count
|
summary.risk.high | integer |
Number of high-risk addresses |
|
Medium Risk Count
|
summary.risk.medium | integer |
Number of medium-risk addresses |
|
Low Risk Count
|
summary.risk.low | integer |
Number of low-risk addresses |
|
Unknown Risk Count
|
summary.risk.unknown | integer |
Number of addresses with unknown risk |
|
Highly Engaged Count
|
summary.engagement.highly_engaged | integer |
Number of highly engaged addresses |
|
Engaged Count
|
summary.engagement.engaged | integer |
Number of engaged addresses |
|
Disengaged Count
|
summary.engagement.disengaged | integer |
Number of disengaged addresses |
|
Bot Count
|
summary.engagement.bot | integer |
Number of bot addresses |
|
Complainer Count
|
summary.engagement.complainer | integer |
Number of complainer addresses |
|
No Data Count
|
summary.engagement.no_data | integer |
Number of addresses with no engagement data |
Get domain details
Fetches JSON representation of a domain that includes details about the domain's state and settings.
Parameters
| Name | Key | Required | Type | Description |
|---|---|---|---|---|
|
Domain Name
|
name | True | string |
The name of the domain you want to fetch |
Returns
| Name | Path | Type | Description |
|---|---|---|---|
|
id
|
domain.id | string |
Unique identifier of the domain |
|
name
|
domain.name | string |
Fully qualified domain name registered with Mailgun |
|
state
|
domain.state | string |
Current verification status of the domain |
|
type
|
domain.type | string |
Classification of the domain. Possible values are custom or sandbox |
|
created_at
|
domain.created_at | string |
Timestamp indicating when the domain was created in RFC1123 format |
|
is_disabled
|
domain.is_disabled | boolean |
Indicates whether the domain is currently disabled |
|
require_tls
|
domain.require_tls | boolean |
If true Mailgun will only send messages over a TLS connection |
|
skip_verification
|
domain.skip_verification | boolean |
If true Mailgun will not verify the certificate and hostname when setting up a TLS connection |
|
smtp_login
|
domain.smtp_login | string |
SMTP login username for the domain |
|
smtp_password
|
domain.smtp_password | string |
Optional SMTP password for the domain used for SMTP authentication |
|
spam_action
|
domain.spam_action | string |
Action to take when a message is flagged as spam. Options are disabled, tag, or block |
|
wildcard
|
domain.wildcard | boolean |
Indicates if the domain is a wildcard domain and can receive emails for any subdomain |
|
subaccount_id
|
domain.subaccount_id | string |
The subaccount ID the domain belongs to |
|
tracking_host
|
domain.tracking_host | string |
Custom tracking host for the domain used for tracking opens and clicks |
|
use_automatic_sender_security
|
domain.use_automatic_sender_security | boolean |
If true Mailgun manages DKIM key generation and DNS record configuration automatically |
|
web_prefix
|
domain.web_prefix | string |
Subdomain prefix used for open and click tracking |
|
web_scheme
|
domain.web_scheme | string |
Protocol scheme used for tracking |
|
archive_to
|
domain.archive_to | string |
URL that a copy of each successfully delivered message is going to be posted to |
|
encrypt_incoming_message
|
domain.encrypt_incoming_message | boolean |
If true incoming messages to this domain will be encrypted |
|
message_ttl
|
domain.message_ttl | integer |
Specifies the time-to-live (TTL) in seconds for retrieving both incoming and outgoing messages |
|
receiving_dns_records
|
receiving_dns_records | array of object |
List of DNS records required for receiving emails |
|
is_active
|
receiving_dns_records.is_active | boolean |
Indicates whether the DNS record is currently active |
|
cached
|
receiving_dns_records.cached | array of string |
List of Mailgun cached values for the DNS record |
|
name
|
receiving_dns_records.name | string |
Name of the DNS record if applicable |
|
priority
|
receiving_dns_records.priority | string |
Priority value for MX DNS records |
|
record_type
|
receiving_dns_records.record_type | string |
Type of DNS record such as MX, TXT, or CNAME |
|
valid
|
receiving_dns_records.valid | string |
Indicates whether the DNS record is valid |
|
value
|
receiving_dns_records.value | string |
Expected value of the DNS record |
|
sending_dns_records
|
sending_dns_records | array of object |
List of DNS records required for sending emails |
|
is_active
|
sending_dns_records.is_active | boolean |
Indicates whether the DNS record is currently active |
|
cached
|
sending_dns_records.cached | array of string |
List of Mailgun cached values for the DNS record |
|
name
|
sending_dns_records.name | string |
Name of the DNS record if applicable |
|
priority
|
sending_dns_records.priority | string |
Priority value for MX DNS records |
|
record_type
|
sending_dns_records.record_type | string |
Type of DNS record such as MX, TXT, or CNAME |
|
valid
|
sending_dns_records.valid | string |
Indicates whether the DNS record is valid |
|
value
|
sending_dns_records.value | string |
Expected value of the DNS record |
Get domains
Get the list of domains. Can be filtered by state or authority. The list is paginated and limited to 1000 items per page.
Parameters
| Name | Key | Required | Type | Description |
|---|---|---|---|---|
|
Limit
|
limit | integer |
Max count of items. Max: 1000. Default: 100 |
|
|
Skip
|
skip | integer |
Get the list of items starting at the nth element. Default: 0 |
|
|
State
|
state | string |
Get only domains with a specific state. Can be either active, unverified or disabled. |
|
|
Sort
|
sort | string |
Valid sort options are name (asc), name:asc, or name:desc. |
|
|
Authority
|
authority | string |
Get only domains with a specific authority. |
|
|
Search
|
search | string |
Search domains by the given partial or complete name. Does not support wildcards. |
|
|
Include Subaccounts
|
include_subaccounts | boolean |
Search on every domain that belongs to any subaccounts under this account. Default: false. |
Returns
| Name | Path | Type | Description |
|---|---|---|---|
|
total_count
|
total_count | integer |
Total number of domains |
|
items
|
items | array of object |
List of domains |
|
id
|
items.id | string |
Unique identifier of the domain |
|
name
|
items.name | string |
Fully qualified domain name registered with Mailgun |
|
state
|
items.state | string |
Current verification status of the domain |
|
type
|
items.type | string |
Classification of the domain. Possible values are custom or sandbox |
|
created_at
|
items.created_at | string |
Timestamp indicating when the domain was created in RFC1123 format |
|
is_disabled
|
items.is_disabled | boolean |
Indicates whether the domain is currently disabled |
|
require_tls
|
items.require_tls | boolean |
If true Mailgun will only send messages over a TLS connection |
|
skip_verification
|
items.skip_verification | boolean |
If true Mailgun will not verify the certificate and hostname when setting up a TLS connection |
|
smtp_login
|
items.smtp_login | string |
SMTP login username for the domain |
|
smtp_password
|
items.smtp_password | string |
Optional SMTP password for the domain used for SMTP authentication |
|
spam_action
|
items.spam_action | string |
Action to take when a message is flagged as spam. Options are disabled, tag, or block |
|
wildcard
|
items.wildcard | boolean |
Indicates if the domain is a wildcard domain and can receive emails for any subdomain |
|
subaccount_id
|
items.subaccount_id | string |
The subaccount ID the domain belongs to |
|
tracking_host
|
items.tracking_host | string |
Custom tracking host for the domain used for tracking opens and clicks |
|
use_automatic_sender_security
|
items.use_automatic_sender_security | boolean |
If true Mailgun manages DKIM key generation and DNS record configuration automatically |
|
web_prefix
|
items.web_prefix | string |
Subdomain prefix used for open and click tracking |
|
web_scheme
|
items.web_scheme | string |
Protocol scheme used for tracking |
|
archive_to
|
items.archive_to | string |
URL that a copy of each successfully delivered message is going to be posted to |
|
encrypt_incoming_message
|
items.encrypt_incoming_message | boolean |
If true incoming messages to this domain will be encrypted |
|
message_ttl
|
items.message_ttl | integer |
Specifies the time-to-live (TTL) in seconds for retrieving both incoming and outgoing messages |
Send an email
Sends an email using your Mailgun account via multipart form fields compatible with Mailgun's messages API.
Parameters
| Name | Key | Required | Type | Description |
|---|---|---|---|---|
|
Domain Name
|
domain_name | True | string |
The domain to send the email from |
|
From Email Address
|
from | True | string |
The email address the message will be sent from. |
|
To Email Address
|
to | True | string |
Recipient email address. |
|
Subject
|
subject | True | string |
The subject of the email. |
|
Email Body (Text)
|
text | string |
Plain text body of the email. |
|
|
Email Body (HTML)
|
html | html |
HTML body of the email. |
|
|
CC Email Address
|
cc | string |
Carbon copy recipient email address. |
|
|
BCC Email Address
|
bcc | string |
Blind carbon copy recipient email address. |
|
|
Reply-To Email Address
|
h:Reply-To | string |
Where replies should be delivered. |
|
|
Attachment
|
attachment | file |
File attachment to include with the message. |
|
|
Tags
|
o:tag | array |
One or more tags to group and filter emails in Mailgun (up to 10 per message). |
Returns
| Name | Path | Type | Description |
|---|---|---|---|
|
Message ID
|
id | string |
Unique identifier assigned to the queued message |
|
Status Message
|
message | string |
Human-readable status from Mailgun (for example, Queued. Thank you.) |
Validate Email
Validates an email address using Mailgun's validation service and returns deliverability results.
Parameters
| Name | Key | Required | Type | Description |
|---|---|---|---|---|
|
Email Address
|
address | True | string |
The email address to validate. |
Returns
| Name | Path | Type | Description |
|---|---|---|---|
|
Email Address
|
address | string |
The email address that was validated |
|
Is Valid
|
is_valid | boolean |
Whether Mailgun considers the address valid |
|
Mailbox Verification
|
mailbox_verification | string |
Mailbox verification status |
|
Is Disposable Address
|
is_disposable_address | boolean |
Whether the address is from a disposable provider |
|
Is Role Address
|
is_role_address | boolean |
Whether the address is a role-based address |
|
Validation Reason
|
reason | array of string |
Validation reasons returned by Mailgun (empty when valid) |
|
Risk Level
|
risk | string |
Risk level assigned by Mailgun |
|
Result
|
result | string |
Mailgun deliverability result (for example deliverable or undeliverable) |
|
Root Address
|
root_address | string |
Normalized root address |
|
Display Name
|
parts.display_name | string |
Display name portion of the address |
|
Domain
|
parts.domain | string |
Domain portion of the address |
|
Local Part
|
parts.local_part | string |
Local part of the address |