Mailgun and Zapier connect to automate email workflows. You can trigger actions when emails bounce or are delivered and send emails or manage mailing lists.
Prerequisites
To use the Mailgun app on Zapier, you must have:
- An active Mailgun account (free plan available with 100 emails/day limit).
- A verified custom domain or subdomain configured in your Mailgun account with proper DNS records (TXT records for SPF and DKIM, MX records, and CNAME record for tracking).
- Your Mailgun API key (Primary Account API key ) which can be found in Account Settings API Keys in your Mailgun dashboard.
Connect Mailgun to Zapier
To create an app connection to Mailgun on Zapier:
- Go to the Apps page.
- Click + Add connection.
- A new dialog box will appear. Search for and select Mailgun.
- Click Add connection.
- A Connect an Account page will open in a browser tab or window.
- Complete the following fields:
- Private API Key: Enter your Mailgun private API key.
- API Region: Select the region your domain is hosted on within Mailgun.
- Domain: Enter your Mailgun domain.
- Click Yes, Continue to Mailgun.
Your Mailgun account is now successfully connected to Zapier.
You can connect to Mailgun using a static IP address.
About Mailgun's app
Triggers, searches, and actions
Triggers
- New Log Data (Polling) - Triggers when new log entries are found in Mailgun. Because this trigger uses polling, multiple log entries may be returned at once during each polling interval.
- New Bounce Event (Instant) - Triggers when an email permanently or temporarily fails in Mailgun.
- New Delivery Event (Instant) - Triggers when an email is successfully delivered in Mailgun.
- New Inbound Email via Route (Instant) - Triggers when an incoming email matches a Mailgun route. Automatically creates a route in Mailgun to forward emails to Zapier. Use Zapier Filters and Paths to process emails based on sender, subject, or content.
- New Unsubscribe Event (Instant) - Triggers when a recipient unsubscribes in Mailgun.
- New Alert (Instant) - Triggers when a Mailgun alert occurs. Validation alerts (e.g., bulk validation job completed, validation previews) are available on all plans. Deliverability alerts (e.g., IP or domain blocklist changes, reputation shifts) require an Optimize plan.
- New Complaint Event (Instant) - Triggers when a recipient reports an email as spam in Mailgun.
- New Failed Delivery Event (Instant) - Triggers when an email fails to deliver in Mailgun.
- New Open/Click Event (Instant) - Triggers when a recipient opens an email or clicks a tracked link in Mailgun.
- New List (Polling) - Triggered when a new mailing list is added to your account.
Searches
- No search actions are available for Mailgun.
Actions
- Bulk Email Validation - Upload a CSV (with an "email" header) and start a bulk validation job using Mailgun V4 API.
- Get Bulk Validation Results - Retrieves completed bulk validation job results using the job identifier for automated result processing.
- Validate Email - Validates an email address using Mailgun's validation service and returns comprehensive deliverability results.
- Send Email - Sends an email using your Mailgun account.
- Add Mailing List Member - Adds a new member to a mailing list in Mailgun.
- API Request (Beta) - This is an advanced action which makes a raw HTTP request that includes this integration's authentication.
Limitations
- Rate Limits apply. Mailgun has rate limits in place to protect their system. Rate limit exceeded errors (HTTP 429) may occur and require retry with exponential backoff.
Templates
View all of Mailgun's templates.