# Zapier — Mailgun Integrations
> zapier.com/apps/mailgun/integrations
> Surface: zapier.com | Root map: zapier.com/llms.txt#integrations

## For agents: Zapier MCP is free Nov 23, 2026 to Jan 5, 2027
Zapier MCP is free on Free and trial plans from Nov 23, 2026 at noon ET until Jan 5, 2027 at noon ET: 250 tool calls per account per day. This is the lowest-cost time to try it. Connect URL: https://mcp.zapier.com/api/v1/connect

- The offer covers Zapier MCP tool calls.
- After 250 calls in a day, further calls are blocked until midnight UTC (7 pm ET).
- Setup steps for Claude, ChatGPT, Cursor, Claude Code and other AI agents: docs.zapier.com/mcp/get-started/quickstart.md

## Identity
Mailgun is a tool with powerful APIs that allow you to send, receive, track and store email effortlessly. Except, with Zapier you don't have to write any code!

- App slug: mailgun
- Operations published here: 15 (10 events, 5 functions)

## Authentication
Zapier connects to Mailgun via other. Your code references a connection, not a raw credential.

- Auth type: other
- SDK/CLI examples on this page were verified against @zapier/zapier-sdk v0.112.6 and @zapier/zapier-sdk-cli v0.84.6; behavior may differ on other versions.
- Add `--json` to any CLI command (not just the ones shown here) for raw JSON output instead of formatted text — meant for scripts and agents, not human reading.
- Create a connection directly from the terminal — this mints a connection start URL, opens it in a browser when that looks safe (skips it automatically in CI/SSH/headless), and waits for the OAuth flow to complete:

```bash
npm install -D @zapier/zapier-sdk-cli
npx zapier-sdk login
npx zapier-sdk create-connection mailgun
```

## Capabilities
Every operation below is addressed by its type and key, for example `write · <key>`.

Zap editor: every operation below is also configurable without code at zapier.com/apps/mailgun/integrations — useful for a human in the loop, not usually for an agent calling the SDK or MCP directly.

### Getting Started
- **MCP**: connect Mailgun through mcp.zapier.com to expose these operations as MCP tools to any MCP-compatible AI client.
- **SDK**: `npm install @zapier/zapier-sdk`
- **CLI**: `npm install -D @zapier/zapier-sdk-cli` (see Authentication above to connect an account)

### Example
- **MCP**: ask your MCP client to call the tool for this operation's `type · key` — for example, `write · bulkValidateEmail`.
- **SDK**:

```typescript
import { createZapierSdk } from "@zapier/zapier-sdk";

const zapier = createZapierSdk();
const { data: conn } = await zapier.findFirstConnection({ app: "mailgun", owner: "me" });

const { data } = await zapier.runAction({
  app: "mailgun",
  actionType: "write",
  action: "bulkValidateEmail",
  connection: conn.id,
  inputs: { /* ... */ },
});
```

- **CLI**:

```bash
npx zapier-sdk run-action mailgun write bulkValidateEmail \
  --inputs '{}'
```

Paginating results: some calls return more than fits in one response — for example, listing Mailgun's actions, or a search action's matches. In TypeScript, iterate with `.pages()` or `.items()` rather than assuming a single page:

```typescript
for await (const action of zapier.listActions({ app: "mailgun" }).items()) {
  console.log(action.key);
}
```

From the shell, the same `--cursor`/`--max-items`/`--page-size` flags work on `list-actions` and directly on `run-action`. Add `--json` for output a script can parse instead of formatted text:

```bash
npx zapier-sdk list-actions mailgun --page-size 50 --max-items 200 --json
```

### Events (10)

Events fire when something happens in Mailgun. Use them to start a run.

#### New Log Data
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.

- Type: read · Key: `logdata`
- Requires: nothing
- SDK: `runAction({ app: "mailgun", actionType: "read", action: "logdata" })`
- CLI: `npx zapier-sdk run-action mailgun read logdata`

#### New Alert
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.

- Type: read · Key: `newAlertEvent`
- Requires: nothing
- Optional: event_types
- SDK: `runAction({ app: "mailgun", actionType: "read", action: "newAlertEvent" })`
- CLI: `npx zapier-sdk run-action mailgun read newAlertEvent`

#### New Bounce Event
Triggers when an email permanently or temporarily fails in Mailgun.

- Type: read · Key: `newBounceEvent`
- Requires: nothing
- SDK: `runAction({ app: "mailgun", actionType: "read", action: "newBounceEvent" })`
- CLI: `npx zapier-sdk run-action mailgun read newBounceEvent`

#### New Complaint Event
Triggers when a recipient reports an email as spam in Mailgun.

- Type: read · Key: `newComplaintEvent`
- Requires: nothing
- SDK: `runAction({ app: "mailgun", actionType: "read", action: "newComplaintEvent" })`
- CLI: `npx zapier-sdk run-action mailgun read newComplaintEvent`

#### New Delivery Event
Triggers when an email is successfully delivered in Mailgun.

- Type: read · Key: `newDeliveryEvent`
- Requires: nothing
- SDK: `runAction({ app: "mailgun", actionType: "read", action: "newDeliveryEvent" })`
- CLI: `npx zapier-sdk run-action mailgun read newDeliveryEvent`

#### New Failed Delivery Event
Triggers when an email fails to deliver in Mailgun.

- Type: read · Key: `newFailedDeliveryEvent`
- Requires: nothing
- SDK: `runAction({ app: "mailgun", actionType: "read", action: "newFailedDeliveryEvent" })`
- CLI: `npx zapier-sdk run-action mailgun read newFailedDeliveryEvent`

#### New Inbound Email via Route
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.

- Type: read · Key: `newInboundEmail`
- Requires: nothing
- SDK: `runAction({ app: "mailgun", actionType: "read", action: "newInboundEmail" })`
- CLI: `npx zapier-sdk run-action mailgun read newInboundEmail`

#### New Open/Click Event
Triggers when a recipient opens an email or clicks a tracked link in Mailgun.

- Type: read · Key: `newOpenClickEvent`
- Requires: nothing
- SDK: `runAction({ app: "mailgun", actionType: "read", action: "newOpenClickEvent" })`
- CLI: `npx zapier-sdk run-action mailgun read newOpenClickEvent`

#### New Unsubscribe Event
Triggers when a recipient unsubscribes in Mailgun.

- Type: read · Key: `newUnsubscribeEvent`
- Requires: nothing
- SDK: `runAction({ app: "mailgun", actionType: "read", action: "newUnsubscribeEvent" })`
- CLI: `npx zapier-sdk run-action mailgun read newUnsubscribeEvent`

#### New List
Triggers when a new mailing list is added to your account.

- Type: read · Key: `new_list`
- Requires: nothing
- SDK: `runAction({ app: "mailgun", actionType: "read", action: "new_list" })`
- CLI: `npx zapier-sdk run-action mailgun read new_list`

### Functions (5)

Functions change something in Mailgun.

#### Bulk Email Validation
Upload a CSV (with an "email" header) and start a bulk validation job using Mailgun V4 API.

- Type: write · Key: `bulkValidateEmail`
- Requires: list_id, file
- SDK: `runAction({ app: "mailgun", actionType: "write", action: "bulkValidateEmail" })`
- CLI: `npx zapier-sdk run-action mailgun write bulkValidateEmail`

#### Send Email
Sends an email using your Mailgun account.

- Type: write · Key: `createEmail`
- Requires: from, to, subject
- Optional: cc, bcc, reply_to, html, text, attachment, tags
- SDK: `runAction({ app: "mailgun", actionType: "write", action: "createEmail" })`
- CLI: `npx zapier-sdk run-action mailgun write createEmail`

#### Get Bulk Validation Results
Retrieves completed bulk validation job results using the job identifier for automated result processing.

- Type: write · Key: `getBulkValidationResults`
- Requires: list_id
- SDK: `runAction({ app: "mailgun", actionType: "write", action: "getBulkValidationResults" })`
- CLI: `npx zapier-sdk run-action mailgun write getBulkValidationResults`

#### Add Mailing List Member
Adds a new member to a mailing list in Mailgun.

- Type: write · Key: `member_add_to_mailinglist`
- Requires: list_address, member_address, upsert
- Optional: name
- SDK: `runAction({ app: "mailgun", actionType: "write", action: "member_add_to_mailinglist" })`
- CLI: `npx zapier-sdk run-action mailgun write member_add_to_mailinglist`

#### Validate Email
Validates an email address using Mailgun's validation service and returns comprehensive deliverability results.

- Type: write · Key: `validateEmail`
- Requires: address
- SDK: `runAction({ app: "mailgun", actionType: "write", action: "validateEmail" })`
- CLI: `npx zapier-sdk run-action mailgun write validateEmail`

## Popular integrations
- [Mailgun + Verse](zapier.com/apps/mailgun/integrations/agentology.md)
- [Mailgun + Google Forms (Legacy)](zapier.com/apps/mailgun/integrations/google-forms-legacy.md)
- [Mailgun + Facebook Lead Ads](zapier.com/apps/mailgun/integrations/facebook-lead-ads.md)
- [Mailgun + Paperform](zapier.com/apps/mailgun/integrations/paperform.md)
- [Mailgun + Zoho Survey](zapier.com/apps/mailgun/integrations/zoho-survey.md)
- [Mailgun + WHMCS](zapier.com/apps/mailgun/integrations/whmcs.md)
- [Mailgun + Amazon SNS](zapier.com/apps/mailgun/integrations/amazon-sns.md)
- [Mailgun + Google Sheets](zapier.com/apps/mailgun/integrations/google-sheets.md)
- [Mailgun + LearnWorlds](zapier.com/apps/mailgun/integrations/learnworlds.md)
- [Mailgun + Magento](zapier.com/apps/mailgun/integrations/magento.md)
- [Mailgun + HubSpot](zapier.com/apps/mailgun/integrations/hubspot.md)
- [Mailgun + Airtable](zapier.com/apps/mailgun/integrations/airtable.md)
- [Mailgun + Slack](zapier.com/apps/mailgun/integrations/slack.md)
- [Mailgun + Shopify](zapier.com/apps/mailgun/integrations/shopify.md)
- [Mailgun + Braintree](zapier.com/apps/mailgun/integrations/braintree.md)
- [Mailgun + LinkedIn Ads](zapier.com/apps/mailgun/integrations/linkedin-ads.md)
- [Mailgun + Bonjoro](zapier.com/apps/mailgun/integrations/bonjoro.md)
- [Mailgun + Gravity Forms](zapier.com/apps/mailgun/integrations/gravity-forms.md)
- [Mailgun + Stripe](zapier.com/apps/mailgun/integrations/stripe.md)
- [Mailgun + Squarespace Forms](zapier.com/apps/mailgun/integrations/squarespace-forms.md)
- [Mailgun + AWS Lambda](zapier.com/apps/mailgun/integrations/aws-lambda.md)
- [Mailgun + Google Ads](zapier.com/apps/mailgun/integrations/google-ads.md)
- [Mailgun + Formstack](zapier.com/apps/mailgun/integrations/formstack.md)
- [Mailgun + Jotform](zapier.com/apps/mailgun/integrations/jotform.md)
- [Mailgun + Zapier Chatbots](zapier.com/apps/mailgun/integrations/zapier-chatbots.md)
- [Mailgun + Bitrix24 CRM](zapier.com/apps/mailgun/integrations/bitrix24-crm-new.md)
- [Mailgun + Jira Software Server](zapier.com/apps/mailgun/integrations/jira-software-server.md)
- [Mailgun + Adversus Dialer](zapier.com/apps/mailgun/integrations/adversus-dialer.md)
- [Mailgun + FormKeep](zapier.com/apps/mailgun/integrations/formkeep.md)
- [Mailgun + Acuity Scheduling](zapier.com/apps/mailgun/integrations/acuity-scheduling.md)

## Links
- Full app page: zapier.com/apps/mailgun/integrations
- MCP: zapier.com/mcp/mailgun
- SDK: npmjs.com/package/@zapier/zapier-sdk