n8n + MailOdds
Self-hosted workflow automation with full API access. 23 production-ready patterns for validation, sending, ecommerce, monitoring, and platform sync.
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
Drop a CSV or Excel file into a Google Drive folder and get validated, rejected, and manual-review files sorted into organized folders automatically.
Google Sheets Bulk Validation
Launch validation jobs from Google Sheets via webhook and get results merged back automatically with deduplication, row mapping, and summary statistics.
Real-Time Lead Validation
Validate a single email on form submission or lead creation. Routes results by action: accept to CRM, reject to discard, caution to manual review.
Async Bulk Job
Submit an email list for async validation with polling and idempotency. Handles completed, failed, and cancelled job states with a configurable poll limit.
Sync Batch Validation
Validate up to 100 emails in a single synchronous request. No polling, no callbacks. Results return immediately with per-email action routing.
Bounce-to-Suppression Pipeline
Receives ESP bounce webhooks (SendGrid, Mailgun, SES), normalizes the payload, and adds hard bounces to the MailOdds suppression list automatically.
Telemetry Dashboard
Pull hourly validation metrics into Google Sheets with ETag caching. Sends a Slack alert when the deliverable rate drops below a configurable threshold.
Manual Review Loop
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.
Policy-Aware Validation
Create validation policies from presets (strict, permissive, smtp_required) and apply them per-request. Two workflows: one-time setup and the main validation flow.
Pre-Validated Email Delivery
Receive an email via webhook, validate the recipient, check suppression, and send through the MailOdds deliver endpoint. Rejects are auto-suppressed.
Bounce and Failure Alert Pipeline
Receives MailOdds delivery webhooks (bounced, failed, deferred), verifies HMAC signatures, deduplicates events, and auto-suppresses hard bounces with Slack alerts.
Weekly Sending Health Digest
Pulls 7-day sending stats and domain identity scores every Monday, formats a Slack Block Kit digest, and logs metrics to Google Sheets.
Shopify Order Confirmation Pipeline
Receives Shopify orders/create webhooks, checks suppression, and sends order confirmation emails with JSON-LD schema and ai_summary for rich inbox cards.
Real Engagement to Klaviyo Sync
Receives MailOdds engagement webhooks, filters out bot opens and Apple MPP events, and syncs real human engagement data to Klaviyo profiles.
HubSpot New Contact Gatekeeper
Validates new HubSpot contacts on creation, maps validation results to custom properties, and downgrades lifecycle stage for rejected emails.
DNS Health Monitor with Alerts
Runs daily at 6am, fetches identity scores for all sending domains, and alerts when any domain drops below a configurable grade threshold.
Job Results to Subscriber List
Receives job.completed webhooks, creates a new subscriber list, paginates all valid results, and subscribes each email with double opt-in.
Deliverability Anomaly Alert
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.
MailOdds Bounce to ESP Cross-Sync
Receives MailOdds bounce webhooks, verifies and deduplicates, then fans out hard bounce suppressions to Mailchimp, Klaviyo, and ActiveCampaign in parallel.
Shopify/WooCommerce Shipping Email
Receives Shopify fulfillment webhooks, checks suppression, and sends shipping notification emails with tracking schema_data and ai_summary for rich inbox cards.
Mailchimp List Cleaning Pipeline
Runs weekly, fetches Mailchimp list members, validates in batches of 100, archives invalid members in Mailchimp, and suppresses in MailOdds.
Post-Purchase Review Request Sender
Runs daily, finds 7-day-old Shopify orders, checks suppression, and sends review request emails with campaign_type: review_request and JSON-LD schema.
Form-to-Validated-Subscriber Pipeline
Receives form submissions via webhook, validates the email, and subscribes valid addresses to a MailOdds list with double opt-in and consent proof metadata.
Quick Setup
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
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.
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:
{{ $json.action === 'accept' }}{{ $json.action === 'accept_with_caution' }}{{ $json.action === 'reject' }}{{ $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
| Field | Type | Description |
|---|---|---|
| event | string | Event type (message.bounced, message.opened, message.clicked, etc.) |
| to | string | Recipient email address |
| message_id | string | Unique message identifier |
| is_bot | boolean | True if event from security scanner/link prefetcher (engagement events only) |
| is_mpp | boolean | True if event from Apple Mail Privacy Protection (engagement events only) |
| link_url | string | Clicked URL (message.clicked only) |
| bounce_type | string | hard or soft (message.bounced only) |
| timestamp | string | ISO 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.