MailOdds
n8n

n8n + MailOdds

Self-hosted workflow automation with full API access. 23 production-ready patterns for validation, sending, ecommerce, monitoring, and platform sync.

Setup time: 10-30 min
Difficulty: Intermediate
1,000 free validations included

Prerequisites

  • MailOdds account (free tier works)
  • API key from dashboard
  • n8n instance (cloud or self-hosted, v1.30+)
  • Familiarity with n8n expressions

Self-Hosted

Run n8n on your own infrastructure with full control over your data.

Open Source

Fully open-source with an active community and extensible architecture.

Secure

Your API keys never leave your server. Full audit trail of all operations.

Integration Patterns

23 production-ready workflows for validation, sending, monitoring, and platform sync.

Google Drive Auto-Validation

Ops Advanced

Drop a CSV or Excel file into a Google Drive folder and get validated, rejected, and manual-review files sorted into organized folders automatically.

POST /v1/jobs/uploadpresigned S3GET /v1/jobs/{id}/results

Google Sheets Bulk Validation

Marketing Advanced

Launch validation jobs from Google Sheets via webhook and get results merged back automatically with deduplication, row mapping, and summary statistics.

POST /v1/jobswebhook callbackGET /v1/jobs/{id}/results

Real-Time Lead Validation

Sales Dev Beginner

Validate a single email on form submission or lead creation. Routes results by action: accept to CRM, reject to discard, caution to manual review.

POST /v1/validateaction routing

Async Bulk Job

Developer Intermediate

Submit an email list for async validation with polling and idempotency. Handles completed, failed, and cancelled job states with a configurable poll limit.

POST /v1/jobsidempotency_keyGET /v1/jobs/{id}

Sync Batch Validation

Ops Beginner

Validate up to 100 emails in a single synchronous request. No polling, no callbacks. Results return immediately with per-email action routing.

POST /v1/validate/batchenhanced depth

Bounce-to-Suppression Pipeline

Deliverability Intermediate

Receives ESP bounce webhooks (SendGrid, Mailgun, SES), normalizes the payload, and adds hard bounces to the MailOdds suppression list automatically.

POST /v1/suppressionwebhook ingestion

Telemetry Dashboard

RevOps Intermediate

Pull hourly validation metrics into Google Sheets with ETag caching. Sends a Slack alert when the deliverable rate drops below a configurable threshold.

GET /v1/telemetry/summaryETag caching

Manual Review Loop

Sales Dev Intermediate

Validates incoming leads via webhook, auto-accepts clean emails to your CRM, rejects invalid ones, and routes uncertain results to a Google Sheet for human review.

POST /v1/validatehuman-in-the-loop

Policy-Aware Validation

Compliance Advanced

Create validation policies from presets (strict, permissive, smtp_required) and apply them per-request. Two workflows: one-time setup and the main validation flow.

GET /v1/policies/presetsPOST /v1/policies/from-presetpolicy_id

Pre-Validated Email Delivery

Developer Beginner

Receive an email via webhook, validate the recipient, check suppression, and send through the MailOdds deliver endpoint. Rejects are auto-suppressed.

POST /v1/validatePOST /v1/deliverPOST /v1/suppression

Bounce and Failure Alert Pipeline

Deliverability Intermediate

Receives MailOdds delivery webhooks (bounced, failed, deferred), verifies HMAC signatures, deduplicates events, and auto-suppresses hard bounces with Slack alerts.

message.bounced webhookPOST /v1/suppressionHMAC verification

Weekly Sending Health Digest

RevOps Intermediate

Pulls 7-day sending stats and domain identity scores every Monday, formats a Slack Block Kit digest, and logs metrics to Google Sheets.

GET /v1/sending-statsGET /v1/sending-domains/{id}/identity-score

Shopify Order Confirmation Pipeline

Ecommerce Advanced

Receives Shopify orders/create webhooks, checks suppression, and sends order confirmation emails with JSON-LD schema and ai_summary for rich inbox cards.

POST /v1/delivercampaign_type: order_confirmationschema_dataai_summary

Real Engagement to Klaviyo Sync

Marketing Intermediate

Receives MailOdds engagement webhooks, filters out bot opens and Apple MPP events, and syncs real human engagement data to Klaviyo profiles.

message.opened webhookmessage.clicked webhookis_bot filteringis_mpp filtering

HubSpot New Contact Gatekeeper

Sales Dev Intermediate

Validates new HubSpot contacts on creation, maps validation results to custom properties, and downgrades lifecycle stage for rejected emails.

POST /v1/validateaction routingdisposable detection

DNS Health Monitor with Alerts

Ops Intermediate

Runs daily at 6am, fetches identity scores for all sending domains, and alerts when any domain drops below a configurable grade threshold.

GET /v1/sending-domainsGET /v1/sending-domains/{id}/identity-scoregrade threshold

Job Results to Subscriber List

Marketing Advanced

Receives job.completed webhooks, creates a new subscriber list, paginates all valid results, and subscribes each email with double opt-in.

job.completed webhookGET /v1/jobs/{id}/resultsPOST /v1/listsPOST /v1/subscribe/{list_id}

Deliverability Anomaly Alert

Deliverability Intermediate

Runs every 4 hours, checks sending stats against configurable thresholds, and fires Slack alerts when delivery rate, bounce rate, or bot opens cross anomaly thresholds.

GET /v1/sending-statsGET /v1/telemetry/summaryETag cachingbaseline comparison

MailOdds Bounce to ESP Cross-Sync

Deliverability Intermediate

Receives MailOdds bounce webhooks, verifies and deduplicates, then fans out hard bounce suppressions to Mailchimp, Klaviyo, and ActiveCampaign in parallel.

message.bounced webhookbounce_typePOST /v1/suppression

Shopify/WooCommerce Shipping Email

Ecommerce Advanced

Receives Shopify fulfillment webhooks, checks suppression, and sends shipping notification emails with tracking schema_data and ai_summary for rich inbox cards.

POST /v1/delivercampaign_type: shipping_notificationschema_dataJSON-LD

Mailchimp List Cleaning Pipeline

Marketing Advanced

Runs weekly, fetches Mailchimp list members, validates in batches of 100, archives invalid members in Mailchimp, and suppresses in MailOdds.

POST /v1/validate/batchPOST /v1/suppressionMailchimp archive

Post-Purchase Review Request Sender

Ecommerce Advanced

Runs daily, finds 7-day-old Shopify orders, checks suppression, and sends review request emails with campaign_type: review_request and JSON-LD schema.

POST /v1/delivercampaign_type: review_requestPOST /v1/suppression/check

Form-to-Validated-Subscriber Pipeline

Marketing Beginner

Receives form submissions via webhook, validates the email, and subscribes valid addresses to a MailOdds list with double opt-in and consent proof metadata.

POST /v1/validatePOST /v1/subscribe/{list_id}double opt-inconsent proof
View detailed setup guides

Quick Setup

1

Create MailOdds Credentials in n8n

In n8n, go to Credentials and create a new "Header Auth" credential with your MailOdds API key.

Get your API Key
// n8n HTTP Header Auth Credentials

Name: MailOdds API
Header Auth:
  Name: Authorization
  Value: Bearer YOUR_API_KEY
2

Import a Workflow Template

Download any workflow JSON from the patterns above, then import it in n8n via Workflows, Import from File. Each template includes setup instructions in a sticky note.

3

Replace Placeholders and Activate

Update credential IDs and any REPLACE_WITH_* placeholders in the workflow nodes, then activate.

Action Routing Reference

Use these expressions in Switch or IF nodes to route based on validation results:

Accept (safe to send)
{{ $json.action === 'accept' }}
Accept with Caution (catch-all, risky)
{{ $json.action === 'accept_with_caution' }}
Reject (invalid, do not send)
{{ $json.action === 'reject' }}
Disposable Email (sub-status check)
{{ $json.sub_status === 'disposable' }}

Webhook Configuration

Receive real-time event notifications from MailOdds using a Webhook Trigger node. Copy the production URL from n8n and configure it in your MailOdds dashboard under Webhooks.

Supported events: message.bounced, message.opened, message.clicked, message.delivered, message.deferred

Webhook Event Fields

FieldTypeDescription
eventstringEvent type (message.bounced, message.opened, message.clicked, etc.)
tostringRecipient email address
message_idstringUnique message identifier
is_botbooleanTrue if event from security scanner/link prefetcher (engagement events only)
is_mppbooleanTrue if event from Apple Mail Privacy Protection (engagement events only)
link_urlstringClicked URL (message.clicked only)
bounce_typestringhard or soft (message.bounced only)
timestampstringISO 8601 event timestamp

Understanding is_bot and is_mpp in Webhook Events

is_bot = true when the event came from a security scanner, link prefetcher, or corporate email gateway (not a human). Common with Barracuda, Proofpoint, and Mimecast.

is_mpp = true when the event came from Apple Mail Privacy Protection, which pre-fetches all images and inflates open counts. Affects roughly 50% of iOS/macOS mail users.

Both fields are Booleans on engagement events (opened, clicked). Always guard with == true since they may be absent on non-engagement events.

Handle Webhook Events (Function Node)

JAVASCRIPT
// n8n Function Node - Handle MailOdds Webhook Events
// Webhook Trigger node receives events at your n8n webhook URL
const event = $json.event;
const email = $json.to;
const messageId = $json.message_id;

// Filter bot and MPP events for accurate metrics
if ($json.is_bot === true || $json.is_mpp === true) {
  return []; // Skip non-human events
}

return [{
  json: {
    event: event,
    email: email,
    message_id: messageId,
    link_url: $json.link_url || null,
    bounce_type: $json.bounce_type || null,
    timestamp: $json.timestamp
  }
}];

Suppression Management

Build a bounce-to-suppression pipeline using webhook events and the POST /v1/suppression endpoint. Verify suppression status before sending with POST /v1/suppression/check.

Bounce-to-Suppression Pipeline (Function Node)

JAVASCRIPT
// n8n Function Node - Bounce-to-Suppression Pipeline
// After Webhook trigger + Switch on event type:
const email = $json.to;
const bounceType = $json.bounce_type;

// Only suppress hard bounces
if (bounceType !== 'hard') {
  return []; // Skip soft bounces
}

// HTTP Request node config:
// URL: https://api.mailodds.com/v1/suppression
// Method: POST
// Headers: Authorization: Bearer YOUR_API_KEY
// Body: { "entries": [{ "type": "email", "value": email }] }

return [{ json: { email, action: 'suppress' } }];

Check Suppression Status (HTTP Request Node)

JSON
// n8n HTTP Request Node - Check Suppression Status
// URL: https://api.mailodds.com/v1/suppression/check
// Method: POST
// Headers: Authorization: Bearer YOUR_API_KEY
// Body:
{
  "email": "={{ $json.email }}"
}
// Response: { "suppressed": true/false, "reason": "..." }

Telemetry Dashboard

Monitor validation metrics on a schedule using GET /v1/telemetry/summary with ETag caching via n8n static workflow data. When data has not changed, the API returns 304, and the Function node returns an empty array to skip downstream processing.

Telemetry with ETag Caching (Function Node)

JAVASCRIPT
// n8n Function Node - Telemetry with ETag Caching
const staticData = $getWorkflowStaticData('global');
const lastETag = staticData.lastETag || '';

// HTTP Request node config:
// URL: https://api.mailodds.com/v1/telemetry/summary
// Method: GET
// Headers:
//   Authorization: Bearer YOUR_API_KEY
//   If-None-Match: {{ lastETag }}

// After HTTP Request:
const statusCode = $input.first().statusCode;
if (statusCode === 304) {
  return []; // No changes, skip downstream
}

const data = $json;
staticData.lastETag = $input.first().headers?.etag || '';

return [{ json: {
  timestamp: new Date().toISOString(),
  deliverable_rate: data.rates?.deliverable,
  total_validations: data.totals?.validations,
  credits_used: data.totals?.creditsUsed
}}];

Two-Tier Depth Optimization

Save SMTP credits by validating in two tiers. Tier 1 uses depth='standard' (syntax + DNS checks, no SMTP credit cost) to filter obviously invalid emails. Tier 2 uses depth='enhanced' (full SMTP verification) only for leads that pass Tier 1. Use an IF node between the two HTTP Request nodes. Typical savings: 72%.

Two-Tier Depth Optimization Pattern

JAVASCRIPT
// n8n Function Node - Two-Tier Depth Optimization
// Tier 1: Standard validation (syntax + DNS, no SMTP credit cost)
// HTTP Request node:
//   URL: https://api.mailodds.com/v1/validate
//   Method: POST
//   Headers: Authorization: Bearer YOUR_API_KEY
//   Body: { "email": "={{ $json.email }}", "depth": "standard" }

// IF Node: Check Tier 1 result
// Condition: {{ $json.action }} != "reject"
// True branch -> Tier 2
// False branch -> Discard (saved an SMTP credit)

// Tier 2: Enhanced validation for qualified leads only
// HTTP Request node:
//   URL: https://api.mailodds.com/v1/validate
//   Method: POST
//   Headers: Authorization: Bearer YOUR_API_KEY
//   Body: { "email": "={{ $json.email }}", "depth": "enhanced" }

// Switch Node: Route by action (accept, reject, accept_with_caution)
// Typical savings: 72% fewer SMTP credits

Frequently Asked Questions

Troubleshooting

Need more help?

Can't find what you're looking for? We're here to help you get n8n working.

Ready to Automate?

Get your API key and start building self-hosted email validation workflows with 9 ready-to-use templates.