Cloudflare Block
Manage zones, DNS records, and caching in Cloudflare
The Cloudflare block integrates Cloudflare into your workflows. Use it to list zones, manage DNS records, and purge caches — making infrastructure changes and deployments fully automatable without leaving Zelaxy.
Overview
| Property | Value |
|---|---|
| Type | cloudflare |
| Category | tools |
| Color | #F48120 |
When to Use
- List all zones on a Cloudflare account or fetch details for a single zone by ID.
- Programmatically create, update, or delete DNS records (A, CNAME, MX, TXT) when infrastructure changes.
- Point a new subdomain at a server by creating a DNS record as part of a provisioning workflow.
- Purge a zone's cache after deploying updated content so visitors see the latest version immediately.
- Audit or sync DNS records by reading all current records for a zone.
- Automate DNS teardown by deleting records when deprovisioning a service or environment.
Configuration
Operation (required)
Selects which Cloudflare action to execute. This dropdown is always required and controls which other fields appear.
| Label | ID |
|---|---|
| List Zones | cloudflare_list_zones |
| Get Zone | cloudflare_get_zone |
| List DNS Records | cloudflare_list_dns_records |
| Create DNS Record | cloudflare_create_dns_record |
| Update DNS Record | cloudflare_update_dns_record |
| Delete DNS Record | cloudflare_delete_dns_record |
| Purge Cache | cloudflare_purge_cache |
API Token (required)
Your Cloudflare API token, stored as a secret. Required for every operation. Use {{CLOUDFLARE_API_TOKEN}} to reference an environment variable.
Zone/Record Name
The zone domain name (e.g. example.com) or the DNS record name to create. Shown when the operation is List Zones or Create DNS Record.
Zone ID
The target zone's unique ID. Shown for Get Zone, List DNS Records, Create DNS Record, and Purge Cache.
Record ID
The DNS record's unique ID. Shown for Update DNS Record and Delete DNS Record.
Record Type
The DNS record type. Shown for Create DNS Record and Update DNS Record.
| Label | ID |
|---|---|
| A | A |
| CNAME | CNAME |
| MX | MX |
| TXT | TXT |
Record Content
The record's value (e.g. 1.2.3.4 for an A record). Shown for Create DNS Record and Update DNS Record.
Operation Field Matrix
| Operation | Required fields | Optional / condition-gated fields |
|---|---|---|
| List Zones | apiToken | name |
| Get Zone | apiToken, zoneId | — |
| List DNS Records | apiToken, zoneId | — |
| Create DNS Record | apiToken, zoneId, name, recordType, recordContent | — |
| Update DNS Record | apiToken, recordId, recordType, recordContent | — |
| Delete DNS Record | apiToken, recordId | — |
| Purge Cache | apiToken, zoneId | — |
Inputs & Outputs
-
Inputs:
operation(string) — Operation to perform (one of the operation IDs above)apiToken(string) — API tokenname(string) — Zone or record namezoneId(string) — Zone IDrecordId(string) — Record IDrecordType(string) — DNS record typerecordContent(string) — Record content
-
Outputs:
zones(json) — Zone list (populated by List Zones)dnsRecords(json) — DNS records (populated by List DNS Records)
Tools
Cloudflare List Zones (cloudflare_list_zones) — Lists all zones (domains) in the Cloudflare account. Supports optional filtering by name, status, account ID, and pagination parameters.
Cloudflare Get Zone (cloudflare_get_zone) — Retrieves full details for a single zone by its ID, including status, name, and configuration.
Cloudflare List DNS Records (cloudflare_list_dns_records) — Lists DNS records for a specific zone. Supports optional filtering by record type, name, content, and free-text search across record fields.
Cloudflare Create DNS Record (cloudflare_create_dns_record) — Creates a new DNS record in a zone. Accepts type, name, content, TTL, proxied flag, priority (for MX/SRV), and an optional comment.
Cloudflare Update DNS Record (cloudflare_update_dns_record) — Updates an existing DNS record using a PATCH request. All fields (type, name, content, TTL, proxied, priority, comment) are optional; only supplied fields are changed.
Cloudflare Delete DNS Record (cloudflare_delete_dns_record) — Permanently deletes a DNS record from a zone by record ID. Returns the deleted record ID on success.
Cloudflare Purge Cache (cloudflare_purge_cache) — Purges cached content for a zone. Supports purging everything (purge_everything: true), specific URLs, cache tags (Enterprise), hostnames (Enterprise), or URL prefixes (Enterprise).
YAML Example
cloudflare_1:
type: cloudflare
name: "Cloudflare"
inputs:
operation: "cloudflare_create_dns_record"
apiToken: "{{CLOUDFLARE_API_TOKEN}}"
zoneId: "{{start.zoneId}}"
name: "app.example.com"
recordType: "A"
recordContent: "1.2.3.4"
connections:
outgoing:
- target: next-block-id