Validate email submissions from Typeform automatically. Catch fake emails before they enter your CRM or mailing list.
Your endpoint receives a POST when someone submits the form.
Extract the email from the payload and POST to /v1/validate.
Only pass valid emails to your CRM. Suppress or discard invalid ones.
Send verified contacts to HubSpot, Mailchimp, Google Sheets, etc.
// Webhook handler - Validate Typeform email submission
// Typeform sends a POST to your endpoint on each form response
app.post('/typeform-webhook', async (req, res) => {
const answers = req.body.form_response.answers;
const emailAnswer = answers.find(a => a.type === 'email');
const email = emailAnswer?.email;
if (!email) return res.status(400).json({ error: 'No email in submission' });
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 })
});
const result = await response.json();
const is_valid = result.action === 'accept';
// Route based on validation result
if (is_valid) {
await addToCRM(email, result);
}
res.json({ email: result.email, status: result.status, action: result.action, is_valid });
}); // Filter invalid emails and suppress them
// After validation, reject bad emails and optionally add to suppression list
async function handleValidationResult(result) {
if (result.action === 'reject') {
// Add hard rejects to suppression list to prevent future sends
await fetch('https://api.mailodds.com/v1/suppression', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
email: result.email,
reason: 'typeform_invalid_submission'
})
});
return { action: 'suppressed', email: result.email };
}
// Valid or cautionary: pass to downstream systems
return { action: 'accepted', email: result.email };
} Map validation results to lead quality tiers. Use the action field to assign scores and the delivery_confidence field for finer-grained routing.
// Lead scoring from MailOdds validation result
function scoreLeadFromValidation(email, validationResult) {
const { action, delivery_confidence } = validationResult;
let quality_tier, score;
if (action === 'accept') {
quality_tier = 'high';
score = 100;
} else if (action === 'accept_with_caution') {
quality_tier = 'medium';
score = 50;
} else {
quality_tier = 'low';
score = 0;
}
return {
email,
quality_tier,
score,
delivery_confidence,
tag: quality_tier + '_quality_lead'
};
} Use standard depth for general intake forms (fast, syntax and domain checks only) and enhanced for high-value forms like demo requests (full SMTP verification). Route by Typeform form ID to apply the right depth automatically.
// Tiered validation based on Typeform form ID
// Use 'standard' for general forms, 'enhanced' for high-value forms
app.post('/typeform-webhook', async (req, res) => {
const formId = req.body.form_response.form_id;
const answers = req.body.form_response.answers;
const email = answers.find(a => a.type === 'email')?.email;
const isHighValue = formId === 'YOUR_DEMO_FORM_ID';
const depth = isHighValue ? 'enhanced' : 'standard';
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, depth })
});
const result = await response.json();
res.json({
email: result.email,
action: result.action,
depth_used: depth,
delivery_confidence: result.delivery_confidence
});
}); MailOdds is a full-cycle email platform. After validating your Typeform contacts, you can send campaigns, monitor deliverability, and track engagement from the same API.
Can't find what you're looking for? We're here to help you get Typeform working.
Get 1,000 free validations and start verifying form submissions today.