Skip to content
NEWMarketplace and the trig8n Agent: sell what you build, and get plans and changes that are tested before you see them. See what is new

Library / Email Automation

Email Automation

Monitor SPF, DKIM and DMARC across multiple domains with Apify, Gmail and Slack

On a schedule, it handles email using Data Table, Gmail, Slack, Apify.

What it does

## Monitor SPF, DKIM and DMARC for multiple domains with Apify, Gmail and Slack Daily SPF, DKIM and DMARC checks for agencies, MSPs and IT teams that look after many sending domains. A Data Table ledger remembers every finding, so you see what is new, changed, fixed or still open. ### How it works 1. A daily schedule loads your domains and DKIM selectors from CONFIG and creates the deliverability_ledger Data Table on the first run. 2. The *Email Deliverability Auditor* Apify Actor checks each domain separately: SPF (single record, 10-lookup limit, +all/?all/~all), DKIM keys on your selectors and DMARC (record, p= policy, rua). 3. Each check becomes a finding: critical, warning or info. 4. Findings are compared with the ledger, labelled new, changed, fixed or still open, and saved. 5. A Switch routes by severity. An HTML digest is emailed every run; Slack only hears about changes. 6. A failed audit is retried once; if it still fails, it is reported and the other domains carry on. ### Setup 1. Add a Header Auth credential (Name Authorization, Value Bearer YOUR_APIFY_TOKEN) to *Audit domain (Apify)*. 2. Connect Gmail and Slack, or set their enabled to false in CONFIG. 3. Edit CONFIG: domains, DKIM selectors, rules, email address and Slack channel. 4. Click Test workflow to record a baseline, then activate. ### Requirements n8n with Data Tables (tested on 2.43), an Apify account (Email Deliverability Auditor Actor), Gmail and/or Slack. ### Customization Tune spfLookupWarningAt, dmarcTargetPolicy, softfailIsInfo and requireDkim in CONFIG. About $0.002 per domain per check on Apify. Disclosure: the Apify Actor used here was built and is published by the author of this template (EdenWorks). You pay Apify's usage price when it runs and the author earns part of that fee. Apify's free plan credits cover light use.

The steps

  1. Daily check (7:00)
  2. Run check now
  3. CONFIG
  4. Create ledger table (first run only)
  5. Split domains into items
  6. Audit domain (Apify)
  7. Wait 30 s before retry
  8. Retry audit (Apify)
  9. Extract findings per check
  10. Record lookup failure
  11. Combine results
  12. Load ledger
  13. Compare with ledger
  14. Save findings to ledger

24 steps in total.

Similar automations