Overview
This node interacts with the Cloudflare DNS API to manage DNS records within a specified DNS zone. Specifically, the Update DNS Record operation allows users to modify existing DNS records by specifying the zone, record ID, and new record details.
Common scenarios where this node is beneficial include:
- Updating IP addresses for A or AAAA records when servers change.
- Modifying CNAME targets during domain restructuring.
- Adjusting MX records to change mail routing priorities.
- Changing TTL or proxy settings for performance or security tuning.
For example, if you have a website whose hosting IP changes, you can use this node to update the A record automatically without manual intervention in the Cloudflare dashboard.
Properties
| Name | Meaning |
|---|---|
| Zone ID | The unique identifier of the DNS zone where the record exists. |
| DNS Record ID | The unique identifier of the DNS record to update. |
| Record Type | The type of DNS record. Options: A, AAAA, CNAME, MX, TXT, NS, SRV, PTR |
| Record Name | The name of the DNS record (e.g., "www", "@" for root domain). |
| Record Content | The content of the DNS record (e.g., IP address for A record, target domain for CNAME). |
| Additional Fields | Optional extra settings: • TTL (Time To Live in seconds, 1 means automatic) • Proxied (boolean, whether traffic is proxied through Cloudflare) • Comment (a text comment for the record) • Tags (comma-separated tags for categorization) • Priority (number, applicable only for MX and SRV records) |
Output
The node outputs an array of JSON objects representing the updated DNS record(s). Each object contains the full details of the DNS record as returned by the Cloudflare API after the update, including fields such as id, type, name, content, ttl, proxied, comment, tags, and priority (if applicable).
No binary data output is produced by this operation.
Dependencies
- Requires an active Cloudflare account with API access.
- Needs an API authentication token configured in n8n credentials to authorize requests to the Cloudflare DNS API.
- Network connectivity to
https://api.cloudflare.com/client/v4.
Troubleshooting
Common issues:
- Invalid or missing Zone ID or DNS Record ID will cause the API to reject the request.
- Incorrect API credentials or insufficient permissions will result in authentication errors.
- Providing invalid values for record type or content may cause validation errors from Cloudflare.
- Attempting to set priority on unsupported record types will be ignored.
Error messages:
Cloudflare API Error: [...]indicates the API returned an error response. The message includes details from Cloudflare's error payload.
Resolutions:
- Verify that the Zone ID and DNS Record ID are correct and correspond to existing resources.
- Ensure the API key/token has appropriate permissions for DNS record editing.
- Double-check the record type and content formats according to DNS standards.
- For priority, only use it with MX or SRV record types.