Back up Cloudflare DNS zones to Amazon S3 with retention and email reports
Ready for 3.0What this workflow does
This workflow has 20 nodes and runs on a schedule (cron 0 3 * * *). Along the way it connects AWS S3. It also calls api.cloudflare.com over HTTP.
How it runs
Trigger: On a schedule (cron 0 3 * * *).
- Backup settings (Edit Fields (Set)): sets 7 fields: zones, s3_bucket, s3_prefix…
- Check your settings (Code): runs custom JavaScript code
- List your zones (HTTP Request): calls api.cloudflare.com
- Choose the zones (Code): runs custom JavaScript code
- One zone at a time (Loop Over Items (Split in Batches)): loops over the items in batches
- Plan the clean-up (Code): runs custom JavaScript code
- Can this zone be backed up? (If): checks a condition and branches into true / false
- Anything to delete? (If): checks a condition and branches into true / false
- Export the zone file (HTTP Request): calls an HTTP API
- Zone not backed up (Code): runs custom JavaScript code
…plus 9 more steps. See the full node list below.
Services it uses
HTTP calls to: api.cloudflare.com
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (8)
- Schedule Trigger
n8n-nodes-base.scheduleTrigger - Edit Fields (Set)
n8n-nodes-base.set - Code
n8n-nodes-base.code - HTTP Request
n8n-nodes-base.httpRequest - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - If
n8n-nodes-base.if - AWS S3
n8n-nodes-base.awsS3 - Send Email
n8n-nodes-base.emailSend
From the author
Quick overview This workflow runs daily to export DNS records for your Cloudflare zones as BIND zone files, store them in Amazon S3 with a retention policy, and email a per-run report showing successes, failures, and any backups removed. How it works 1. Runs…