zone/list
List all Cloudflare zones accessible to the configured API Token.
When to Use
- Admin dashboard enumeration: Populate a dropdown or table of all managed domains in an internal dashboard.
- Pre-change verification: Verify a zone exists and is active before executing DNS changes or cache purges downstream.
- Zone ID discovery: Find the Zone ID for a domain name when it is not already known — use a Filter node downstream to match by name.
- Security audit: Enumerate all zones in the account to check that no unexpected domains have been added.
- Settings comparison: Retrieve all zone IDs and feed them into parallel zone/getSettings calls to compare configurations across domains.
Configuration
Connection
| Field | Type | Required | Description |
|---|---|---|---|
ApiToken | string | required | Scoped Cloudflare API Token. Requires Zone.Read permission. Store in BizFirst Credentials Manager — never hardcode. |
Operation Fields
This operation takes no additional fields. The API Token scope determines which zones are returned.
Sample Configuration
{
"resource": "zone",
"operation": "list",
"connection": {
"ApiToken": "{{ $credentials.cloudflare_readonly }}"
}
}
Validation Errors
| Code | Condition | Resolution |
|---|---|---|
MISSING_API_TOKEN | ApiToken is empty or not configured | Set the ApiToken credential in the connection panel |
UNKNOWN_ERROR | Cloudflare API returned an unexpected error | Check error port output for Cloudflare error codes and messages |
Output
Success Port
| Field | Type | Description |
|---|---|---|
zones | array | Array of zone objects accessible to the API Token |
zones[].id | string | 32-character hex Zone ID used in all other operations |
zones[].name | string | Domain name (e.g., example.com) |
zones[].status | string | Zone status: active, pending, initializing, moved, or deleted |
zones[].nameservers | array | Cloudflare nameservers assigned to this zone |
zones[].plan | object | Current plan details including name (Free, Pro, Business, Enterprise) |
zones[].type | string | Zone type: full, partial, or secondary |
zones[].activatedOn | string | ISO 8601 timestamp when the zone became active |
Error Port
On failure the error port receives an object with code (error code string) and message (human-readable description).
Sample Output
{
"zones": [
{
"id": "023e105f4ecef8ad9ca31a8372d0c353",
"name": "example.com",
"status": "active",
"nameservers": ["alice.ns.cloudflare.com", "bob.ns.cloudflare.com"],
"plan": { "name": "Pro" },
"type": "full",
"activatedOn": "2024-01-15T10:30:00Z"
},
{
"id": "7c5dae5552338874e5053f2534d2767a",
"name": "staging.example.com",
"status": "active",
"nameservers": ["alice.ns.cloudflare.com", "bob.ns.cloudflare.com"],
"plan": { "name": "Free" },
"type": "full",
"activatedOn": "2024-03-01T08:00:00Z"
}
]
}
Expression Reference
| Expression | Returns |
|---|---|
{{ $node.CloudflareList.output.zones }} | Full array of zone objects |
{{ $node.CloudflareList.output.zones[0].id }} | Zone ID of the first zone |
{{ $node.CloudflareList.output.zones[0].name }} | Domain name of the first zone |
{{ $node.CloudflareList.output.zones[0].status }} | Status of the first zone |
{{ $node.CloudflareList.output.zones.length }} | Total number of zones returned |
Node Policies & GuardRails
| Policy | Detail |
|---|---|
| Use scoped tokens only | This operation needs only Zone.Read — do not use an Edit-scoped token for read-only operations |
| Store ApiToken in Credentials Manager | Never paste the token directly into the configuration JSON |
| Validate zone status before writes | Add a Filter node downstream to confirm status === "active" before any DNS or settings changes |
| Rate limit awareness | zone/list counts toward the 1,200 req/5 min limit; avoid polling in tight loops |
| Token scope limits results | The returned list is bounded by which zones the token is scoped to — account-wide tokens return all zones |
Examples
Example 1: Find Zone ID by Domain Name
Use zone/list followed by a Function node to extract the zone ID for a specific domain:
// Function node — find zone by domain name
const targetDomain = "example.com";
const zones = $input.item.json.zones;
const match = zones.find(z => z.name === targetDomain);
if (!match) throw new Error(`Zone not found: ${targetDomain}`);
return [{ json: { zoneId: match.id, zoneName: match.name } }];
Example 2: Filter Active Zones Only
Feed zone/list output into a Filter node configured as: zones[].status equals active. This ensures downstream DNS operations only run against healthy zones.
Example 3: Audit All Zones for Plan Type
Iterate over the zones array with a Loop node. For each zone, check plan.name. Send an alert if any zone is on the Free plan when Pro is required by policy.