Quick overview
This workflow runs daily (or on demand) to audit SPF, DKIM, and DMARC for multiple domains using the Apify Email Deliverability Auditor, tracks changes in an n8n Data Table ledger, and notifies results via Gmail digest emails and Slack messages for new, changed, or fixed findings.
How it works
- Runs on a daily schedule at 7:00 or is started manually, then loads domain, DKIM selector, and notification settings from a configuration block.
- Ensures a deliverability_ledger n8n Data Table exists and splits the configured domain list into one item per domain.
- Calls the Apify Email Deliverability Auditor Actor for each domain to check SPF, DKIM, and DMARC, retrying once after 30 seconds if the audit fails.
- Converts each audit result into per-check findings (critical, warning, info, or ok), including a recorded DNS/audit failure finding when both attempts fail.
- Compares the current findings to the Data Table ledger to label each check as new, changed, still open, fixed, or ok, then upserts the latest state back to the ledger.
- Builds an HTML digest and a Slack change summary, then sends the digest via Gmail every run and posts to Slack only when there are changes.
Setup
- Add an Apify HTTP Header Auth credential with an Authorization header set to Bearer <YOUR_APIFY_TOKEN>.
- Connect Gmail credentials for sending the digest email and Slack credentials for posting messages (or disable either channel in the configuration).
- Update the CONFIG block with your domains, DKIM selectors, notification email address, and Slack channel name.
- Ensure your n8n instance supports Data Tables and that it can create/use a table named deliverability_ledger.
Requirements
Customization
- Tune
spfLookupWarningAt, dmarcTargetPolicy, softfailIsInfo and requireDkim in CONFIG. About $0.002 per domain per check on Apify.
Additional info
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.