Portal Community

zone/purgeAll

Purge all cached assets for a Cloudflare zone. Every subsequent request will hit the origin until assets are re-cached.

Origin load spike: Purging all cached assets means every subsequent request hits your origin server until the cache warms back up. For high-traffic zones this can cause a significant load spike. Prefer cache/purgeByUrl or cache/purgeByTag for surgical invalidation.

When to Use

Configuration

Connection

FieldTypeRequiredDescription
ApiTokenstringrequiredScoped Cloudflare API Token with Cache Purge permission. Store in BizFirst Credentials Manager.

Operation Fields

FieldTypeRequiredDescription
ZoneIdstringrequired32-character hexadecimal Zone ID. Identifies which zone's entire cache to purge.

Sample Configuration

{
  "resource": "zone",
  "operation": "purgeAll",
  "connection": {
    "ApiToken": "{{ $credentials.cloudflare_cache_purge }}"
  },
  "ZoneId": "023e105f4ecef8ad9ca31a8372d0c353"
}

Validation Errors

CodeConditionResolution
MISSING_API_TOKENApiToken is empty or not configuredSet the ApiToken credential with Cache Purge permission
MISSING_ZONE_IDZoneId field is emptyProvide a valid 32-character hex Zone ID
UNKNOWN_ERRORCloudflare returned an error (e.g., insufficient permissions)Verify the token has Cache Purge scope for this zone

Output

Success Port

FieldTypeDescription
idstringPurge job ID assigned by Cloudflare — use for audit logging
statusstringok when the purge request was accepted

Error Port

On failure, the error port receives an object with code and message.

Sample Output

{
  "id": "9a7806061c88ada191ed06f989cc3dac",
  "status": "ok"
}

Expression Reference

ExpressionReturns
{{ $node.PurgeAll.output.id }}Purge job ID for audit log
{{ $node.PurgeAll.output.status }}"ok" on success

Node Policies & GuardRails

PolicyDetail
Use targeted purge when possiblecache/purgeByUrl and cache/purgeByTag minimize origin load — reserve purgeAll for situations that genuinely require full invalidation
Verify Zone ID before executionA wrong Zone ID purges the wrong domain's cache — use zone/list upstream if the ID is not hard-coded
Use Cache Purge scoped tokenToken needs only Cache Purge permission — do not use a Zone.Edit token for this operation
Store ApiToken in Credentials ManagerNever hardcode the token in configuration JSON
Log the purge job IDStore the returned id in an audit log for traceability — required for compliance and incident review

Examples

Example 1: Full Cache Purge as Part of Deployment Pipeline

As the final step in a CI/CD deployment workflow: after Docker containers are updated and health checks pass, call zone/purgeAll to flush stale cached responses. Log the purge job ID to the deployment audit trail.

Example 2: Emergency Purge via Webhook Trigger

Create a workflow triggered by a Webhook node. When an ops engineer POSTs to the webhook URL, the workflow validates the request, calls zone/purgeAll, and sends a Slack confirmation with the purge job ID and timestamp.

Example 3: Scheduled Nightly Cache Refresh

Use a ScheduledTrigger node set to run at 02:00 UTC daily. Call zone/purgeAll for development or staging zones to ensure testers always start the day with fresh content from origin without manual intervention.