Overview
This node interacts with the Cloudflare DNS API to manage DNS records within a specified zone. Specifically, the "Delete" operation for the "DNS Record" resource allows users to remove a DNS record from a Cloudflare zone by specifying the zone and record IDs.
Common scenarios where this node is beneficial include:
- Automating cleanup of obsolete or incorrect DNS entries.
- Integrating DNS management into CI/CD pipelines to dynamically update DNS configurations.
- Managing DNS records programmatically without manual intervention in the Cloudflare dashboard.
For example, if you want to delete a DNS record that points to an old server IP address, you can use this node to specify the zone and record ID and remove it automatically as part of your infrastructure automation.
Properties
| Name | Meaning |
|---|---|
| Zone ID | The unique identifier of the Cloudflare DNS zone where the DNS record exists. |
| DNS Record ID | The unique identifier of the DNS record to be deleted within the specified zone. |
Output
The output is a JSON array containing the result of the delete operation. Each item corresponds to the response from the Cloudflare API for the deletion request. Typically, this includes confirmation of success and metadata about the deleted DNS record.
No binary data is output by this node.
Example output structure (simplified):
[
{
"id": "record-id",
"zone_id": "zone-id",
"success": true,
"errors": [],
"messages": [],
"result": null
}
]
Dependencies
- Requires an API authentication token credential configured in n8n to authenticate requests against the Cloudflare DNS API.
- The node makes HTTP requests to
https://api.cloudflare.com/client/v4endpoints. - Proper permissions on the Cloudflare API key are necessary to delete DNS records.
Troubleshooting
Common issues:
- Invalid or missing Zone ID or DNS Record ID will cause the API call to fail.
- Insufficient API permissions may result in authorization errors.
- Network connectivity issues can prevent successful API communication.
Error messages:
Cloudflare API Error: [...]indicates the Cloudflare API returned an error. The message usually contains details such as invalid parameters or permission issues.
Resolution tips:
- Verify that the Zone ID and DNS Record ID are correct and exist in your Cloudflare account.
- Ensure the API token used has the required permissions to delete DNS records.
- Check network connectivity and proxy settings if applicable.