Check your domains' email setup (SPF, DKIM, DMARC) every week
Every Monday, the agent checks the DNS records that keep your emails out of spam and stop spoofing (SPF, DKIM, DMARC, MX) for each domain in your sheet, scores them out of 100, has AI write an exact fix plan when something is wrong and alerts you on Telegram as soon as a score drops.
- Difficulty
- Intermediate
- Setup time
- ≈ 45 min (estimate, not counting finding your DKIM selectors)
- Estimated cost
- n8n: €0 self-hosted or from €20/month (Starter, billed annually); Google Public DNS: free, no key; OpenAI: billed per use, only called for domains with problems; Google Sheets and Telegram: free
- Category
- Small business & freelancers
⏱ Trigger
Every Monday at 8 am (cron) or on demand
✋ Human approval
Nothing to approve: the agent never touches your DNS. You apply the proposed fixes yourself at your domain provider, after reading them.
→ Output
Updated Google Sheet (score, issues, fix plan) + Telegram alert when a score drops
Autonomy level 3 — Autonomous: Runs end to end on its own; only low-risk actions (read, notify, archive).
01Connected tools
- n8n – Schedule Trigger ↗
- n8n – Google Sheets ↗
- n8n – HTTP Request ↗
- n8n – OpenAI Chat Model ↗
- n8n – Telegram ↗
- Google Public DNS – JSON API ↗
- Gmail – email sender guidelines ↗
02What the agent does on its own
- step 01
Every Monday at 8 am (or when you run a test), reads the Domains tab in Google Sheets: one domain per row, optionally with its DKIM selectors (for example google|selector1).
- step 02
Queries Google Public DNS over HTTPS for each domain, no key needed: MX, SPF, DMARC, MTA-STS and each DKIM selector; a failed lookup counts as "unknown", never as missing.
- step 03
Computes a score out of 100 and a grade (A to D): SPF missing, duplicated, ending in +all or ?all, or with too many lookups; DMARC missing, duplicated, at p=none, without a report address (rua) or partially applied; DKIM key not found or revoked. Missing MTA-STS is only reported as info.
- step 04
For domains with problems, and only those, asks AI (gpt-4o-mini in the template) for a short fix plan with the exact DNS records to publish: a single SPF that keeps existing senders, DMARC first at p=none with a rua address before tightening, DKIM keys generated at the sending service rather than invented.
- step 05
Writes the score, grade, issues, fix plan and check date back to the domain's row.
- step 06
Sends you a Telegram alert (old and new score, problems, proposed fixes) only when a domain's score drops compared with the previous check.
03Agent instructions
> You are an email deliverability engineer. For the domain below, write a short fix plan in plain English and list the exact DNS records to publish. Rules: keep exactly one SPF record and keep the senders already in it; if you cannot know which services send mail, say so instead of inventing them; roll DMARC out with p=none and a rua address first, then quarantine/reject; DKIM keys come from the sending service, so say where to generate them instead of making one up. Domain: {DOMAIN}; score: {SCORE}/100 ({GRADE}); problems: {PROBLEMS}; current DNS records: {RECORDS}. Reply in JSON: {"summary", "fixes": [{"type", "host", "value", "why"}]}.04Limits and legal points
The author's published description mentions a daily check and a domain list typed into a field, while the workflow itself runs on Mondays and reads a Google Sheet: trust the workflow. gpt-4o-mini will be removed from the OpenAI API on 14 January 2027 (OpenAI deprecations page): pick a newer model in the OpenAI Chat Model node. DKIM selectors cannot be guessed: get them from your sending service (Google Workspace, Microsoft 365…), otherwise DKIM is not checked. The first run sends no alert, as there is no previous score yet. The AI plan is only a proposal: a mistake in SPF or DMARC can block your own emails, so have it reviewed if you are unsure.
05In short
- When does the agent run, and what does it produce?
- Trigger: Every Monday at 8 am (cron) or on demand. Output: Updated Google Sheet (score, issues, fix plan) + Telegram alert when a score drops.
- What stays under your control?
- Nothing to approve: the agent never touches your DNS. You apply the proposed fixes yourself at your domain provider, after reading them. Autonomy level 3 — Autonomous: Runs end to end on its own; only low-risk actions (read, notify, archive).
- How much does it cost and how long does setup take?
- Estimated cost: n8n: €0 self-hosted or from €20/month (Starter, billed annually); Google Public DNS: free, no key; OpenAI: billed per use, only called for domains with problems; Google Sheets and Telegram: free. Setup time: ≈ 45 min (estimate, not counting finding your DKIM selectors), difficulty "intermediate". Tools: n8n – Schedule Trigger, n8n – Google Sheets, n8n – HTTP Request, n8n – OpenAI Chat Model, n8n – Telegram, Google Public DNS – JSON API, Gmail – email sender guidelines.
Answers taken from this recipe · updated 2 November 2026
06Source
07Related recipes
Same category or same connected tools.