What it is for
Email delivery service for sending, receiving, and tracking emails
Mailgun triggers react instantly to events in the app (some of them check periodically every few minutes).
Set up the connection
Authentication type: Custom credentials
- 1Sign in to Mailgun and look for the API or integrations section in its settings.
- 2Create an API key or token with the permissions you need and copy it.
- 3In flooows, add a Mailgun step, click "Connect" and paste it into: API Key, Region.
- 4Save the connection: it is stored encrypted and is never shown in plain text.
| Connection field | Type | Required |
|---|---|---|
| API Key | Secret key | Yes |
| Region | Fixed list | Yes |
Credentials are stored encrypted in your isolated database, in Spain, and are never shown in plain text.
How to use it in a flow
- Send Email: fill in Domain, From, To Email Address, Email Subject; use the data selector to map values from earlier steps.
- Validate Email: fill in Email Address; use the data selector to map values from earlier steps.
- Add Mailing List Member: fill in Mailing List, Member Email Address, Update If Exists; use the data selector to map values from earlier steps.
Tips
- •Test each step before publishing to see the exact output structure.
- •Enable retries on steps that call external services.
Triggers (8)
Events that can start a flow. Expand each one to see its fields.
New Bounce EventWebhook (paste the URL in the app)1 fields
| Field | Type | Required |
|---|---|---|
| Domain | List (from your account) | Yes |
New Complaint EventWebhook (paste the URL in the app)1 fields
| Field | Type | Required |
|---|---|---|
| Domain | List (from your account) | Yes |
New Delivery EventWebhook (paste the URL in the app)1 fields
| Field | Type | Required |
|---|---|---|
| Domain | List (from your account) | Yes |
New Failed Delivery EventWebhook (paste the URL in the app)1 fields
| Field | Type | Required |
|---|---|---|
| Domain | List (from your account) | Yes |
New Open EventWebhook (paste the URL in the app)1 fields
| Field | Type | Required |
|---|---|---|
| Domain | List (from your account) | Yes |
New Click EventWebhook (paste the URL in the app)1 fields
| Field | Type | Required |
|---|---|---|
| Domain | List (from your account) | Yes |
New Unsubscribe EventWebhook (paste the URL in the app)1 fields
| Field | Type | Required |
|---|---|---|
| Domain | List (from your account) | Yes |
Bulk Bounce Threshold ExceededPeriodic check4 fields
| Field | Type | Required |
|---|---|---|
| Domain | List (from your account) | Yes |
| Threshold | Number | Yes |
| Window (minutes) | Number | Yes |
| Bounce Type | Fixed list | Yes |
Actions (9)
Operations available as flow steps. Expand each one to see its fields.
Send Email9 fields
| Field | Type | Required |
|---|---|---|
| Domain | List (from your account) | Yes |
| From | Text | Yes |
| To Email Address | Text | Yes |
| CC Email Address | Text | No |
| BCC Email Address | Text | No |
| Reply-To Email Address | Text | No |
| Email Subject | Text | Yes |
| Email Body (Plain Text) | Long text | No |
| Email Body (HTML) | Long text | No |
Validate Email2 fields
| Field | Type | Required |
|---|---|---|
| Email Address | Text | Yes |
| Provider Lookup | Yes / No | No |
Add Mailing List Member6 fields
| Field | Type | Required |
|---|---|---|
| Mailing List | List (from your account) | Yes |
| Member Email Address | Text | Yes |
| Member Name | Text | No |
| Update If Exists | Yes / No | Yes |
| Subscribed | Yes / No | No |
| Custom Variables | JSON | No |
Get Events6 fields
| Field | Type | Required |
|---|---|---|
| Domain | List (from your account) | Yes |
| Event Type | Fixed list | Yes |
| Severity | Fixed list | No |
| Begin Date | Text | No |
| End Date | Text | No |
| Max Results | Number | No |
Get Domain Stats3 fields
| Field | Type | Required |
|---|---|---|
| Domain | List (from your account) | Yes |
| Event Types | Multi-select | Yes |
| Duration | Fixed list | Yes |
List Bounces2 fields
| Field | Type | Required |
|---|---|---|
| Domain | List (from your account) | Yes |
| Max Results | Number | No |
Delete Bounces (Bulk)3 fields
| Field | Type | Required |
|---|---|---|
| Domain | List (from your account) | Yes |
| Scope | Fixed list | Yes |
| Address | Text | No |
Get Domain Health1 fields
| Field | Type | Required |
|---|---|---|
| Domain | List (from your account) | Yes |
Custom API Call10 fields
| Field | Type | Required |
|---|---|---|
| url | Dynamic fields | Yes |
| Method | Fixed list | Yes |
| Headers | Key / value pairs | No |
| Query Parameters | Key / value pairs | No |
| Body Type | List (from your account) | No |
| Body | Dynamic fields | No |
| Response is Binary | Yes / No | No |
| Return Error as Output | Yes / No | No |
| Timeout | Number | No |
| Follow redirects | Yes / No | No |
Common errors
Authentication error
The connection expired or the key was revoked: reconnect it from Connections.
Field not found or empty
Re-test the previous step and remap the field in the data selector.
Field types
"List (from your account)" loads options from your connected account; "Dynamic fields" appear depending on earlier choices; in any field you can insert data from previous steps with the data selector (e.g. {{trigger.email}}). More about data between steps
