Validate email deliverability via webhook using Google and Cloudflare DNS

Go to Workflow
0 views
Built by Fred Carbonare Fred Carbonare
Created on August 28, 2026

Description

Quick Overview
This workflow exposes a webhook that validates an email’s deliverability by checking whether its domain has DNS MX records, using Google DNS-over-HTTPS with an automatic fallback to Cloudflare, and returns a JSON verdict with the reason and resolver source.

How it works
Receives an HTTP request on a webhook endpoint with the email provided as a query parameter or JSON body.
Extracts and normalizes the email address and domain, then rejects malformed inputs with a 400 response.
Queries Google DNS-over-HTTPS to resolve MX records for the extracted domain.
Returns a 200 JSON response marking the email as valid when MX records are present, or invalid when no MX records are returned.
If the Google DNS lookup errors or times out, queries Cloudflare DNS-over-HTTPS for the same MX records.
Returns a 200 JSON response from the Cloudflare result indicating whether MX records exist and which resolver produced the verdict.

Setup
Import the workflow and copy the production webhook URL from the webhook trigger to use in your form, app, or API client.
Send requests using ?email= (GET) or a JSON body containing email to test the endpoint and confirm you receive JSON responses.
Activate the workflow after verifying any firewall or allowlist rules permit outbound HTTPS requests to dns.google and cloudflare-dns.com.

Nodes Used (1)

HTTP Request
n8n-nodes-base.httpRequest