Quick Overview
This workflow checks SPF, DKIM, DMARC, and MX DNS records for a list of domains using Google Public DNS over HTTPS, compares the results to the previous run, and sends a Telegram message only when problems appear, get fixed, or records change.
How it works
- Runs daily at 8:00 or on-demand via a manual test trigger.
- Reads a comma-separated list of domains (optionally with DKIM selectors) and builds DNS queries for MX, SPF (TXT), DMARC (TXT), and each DKIM selector (TXT).
- Calls Google Public DNS over HTTPS (dns.google/resolve) to resolve each requested record, retrying failed requests and treating unresolved lookups as unknown rather than missing.
- Evaluates each domain’s responses to flag issues such as missing/unsafe SPF, missing or weak DMARC settings, missing/revoked DKIM selectors, and missing MX.
- Compares current results with stored results from the last scheduled run to generate a change-only report (new issues, fixed issues, and edited record values), while manual runs produce a full report.
- Sends the compiled alert message to a Telegram chat.
Setup
- Add your domains in the domain list field (comma-separated) and include any DKIM selectors after a colon, for example: example.com, mycompany.com:google|selector1.
- Create a Telegram bot, add the Telegram credential in n8n, and set the target chat ID in the Telegram send message step.
- Adjust the schedule time if needed, then run a manual test to verify the report before activating the workflow.