MailOdds
HubSpot

HubSpot + MailOdds

Validate HubSpot contact emails, automate bounce suppression, score engagement with bot filtering, and detect high-intent leads. Direct Custom Code Actions for Operations Hub or middleware via Zapier and Make.

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

Prerequisites

  • MailOdds account with API key
  • HubSpot Operations Hub Professional+ (for Custom Code Actions)
  • Or: Zapier / Make account (for middleware approach)

Custom Code Action Patterns

7 patterns using HubSpot Custom Code Actions (Operations Hub) to call the MailOdds API directly from workflows. Each runs as a Node.js function inside HubSpot with no external infrastructure.

Zero-Config Sending Domain Authentication

HubSpot users sending via MailOdds get automatic email authentication. Add one NS record for mo.yourdomain.com and MailOdds manages SPF, DKIM, MX, and DMARC automatically. No ongoing DNS maintenance.

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.

Direct Validation via Custom Code Action

Marketing Ops Intermediate

Validate emails in real time inside a HubSpot workflow. A Custom Code Action calls the MailOdds API with enhanced depth and writes status, action, and sub_status back to contact properties.

POST /v1/validateenhanced depthsuggested_email

Two-Tier Cost-Optimized Validation

RevOps Intermediate

Run standard (syntax + DNS) validation first, then only promote qualified contacts to enhanced (SMTP) validation. Typical savings: 72% on validation costs for lists with high disposable/syntax-error rates.

POST /v1/validatestandard depthenhanced depthtwo-pass

Bounce-to-Suppression Pipeline

Deliverability Intermediate

When MailOdds detects a hard bounce via webhook, automatically add the address to your suppression list. Prevents repeated sends to dead addresses and protects sender reputation.

message.bounced webhookPOST /v1/suppressionbounce_type filter

Pre-Campaign List Audit

Marketing Ops Advanced

Before enrolling contacts in a campaign workflow, submit the entire list for batch validation. The Custom Code Action posts emails to the bulk endpoint, then a follow-up workflow processes results.

POST /v1/validate/batchcallback_urlbatch job polling

Contact Engagement Enrichment

Marketing Ops Advanced

Receive webhook events for opens and clicks, filter out bot and Apple Mail Privacy Protection noise, then update custom HubSpot properties with real human engagement data for lead scoring.

message.opened webhookmessage.clicked webhookis_bot filteris_mpp filter

Telemetry Dashboard Sync

RevOps Intermediate

Pull aggregate validation and sending telemetry from the MailOdds API and sync it to custom HubSpot properties or an external dashboard. Uses ETag caching to minimize API calls.

GET /v1/telemetry/summaryETag cachingIf-None-Match

Lead Scoring from Intent Events

Sales Ops Advanced

Receive intent.hot_lead webhook events when MailOdds detects high-intent engagement patterns. Increment the contact lead score and create a task for the assigned sales rep.

intent.hot_lead webhooklead scoringtask creation

Alternative: Middleware Integration (Zapier / Make)

If you are on HubSpot Starter or do not have Operations Hub, use Zapier or Make to connect HubSpot to MailOdds without Custom Code Actions.

Zapier: Validate HubSpot Contact

JAVASCRIPT
// Zapier Code Step - Validate HubSpot Contact Email
const response = await fetch('https://api.mailodds.com/v1/validate', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    email: inputData.email // Mapped from HubSpot contact email
  })
});

const result = await response.json();

return {
  email: result.email,
  status: result.status,
  action: result.action,
  is_valid: result.action === 'accept',
  disposable: result.disposable
};

Make: HubSpot Validation Scenario

JAVASCRIPT
// Make Scenario - HubSpot Contact Validation
// 1. HubSpot: Watch New Contacts (trigger)
// 2. HTTP Module: POST to https://api.mailodds.com/v1/validate
//    Headers: Authorization: Bearer YOUR_API_KEY
//    Body: { "email": "{{1.properties.email}}" }
// 3. HubSpot: Update Contact
//    Property "email_validation_status" = {{2.data.status}}
//    Property "email_action" = {{2.data.action}}
// 4. Router: Branch by action
//    - "reject" -> Add to "Invalid Emails" list
//    - "accept" -> Continue to enrollment workflows

Custom Code Action Setup

1

Create Custom Contact Properties

In HubSpot Settings > Properties, create: email_validation_status (text), email_validation_action (text), email_sub_status (text), engagement_score (number), last_engagement_type (text).

2

Create a Workflow with a Custom Code Action

Go to Automation > Workflows. Create a contact-based workflow. Add a Custom Code action (requires Operations Hub Professional+). Map the contact email as an input field.

3

Paste the Validation Code

Copy the Direct Validation code from the first card above. Replace YOUR_API_KEY with your MailOdds API key. Define output fields matching the callback outputFields.

4

Map Output Fields to Contact Properties

After the Custom Code action, add a "Set Contact Property" action. Map email_status, email_action, and email_sub_status to your custom properties.

5

Configure Webhook Endpoints (Optional)

For engagement scoring and bounce suppression, set up webhook URLs in the MailOdds dashboard. Point them to a Zapier Webhook trigger or your own server that feeds into HubSpot workflows.

6

Build Segments on Validation Status

Create HubSpot active lists filtered by email_validation_action. Use "accept" for clean sends, "reject" for suppression, and "risky" for re-validation.

Frequently Asked Questions

Troubleshooting

Need more help?

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

Clean Your HubSpot CRM Data

Get 1,000 free validations and start verifying HubSpot contacts today.