For those who use Cloudflare for managing their DNS records, this flow attempts to update their DNS A records for a given set of domain names.
It uses http://ipinfo.io/ip to determine the current external IP address. Before running the flow you might like to run
curl ipinfo.io/ip
to check that the correct IP address is returned.
The flow expects an array of domain names in msg.payload. Fill in the subflow properties with your Cloudflare Zone ID, Cloudflare logon email and Global API key and whether the DNS records should be marked as proxied or not. Currently it does not allow different settings for Proxied for different domains. If you needed this you could use two instances of the subflow, one for proxied domains and one for non-proxied.
The subflow gets the current external IP address, then fetches the Cloudflare records for the complete Zone. For each of the domains given it compares the current value in the Cloudflare record with that optained from ipinfo.io
, and updates only those that