Menu

Mattering Automations Cloudflare integration

Connect Cloudflare to Mattering Automations: DNS records with zone-file export and import, cache purge in every mode, zone settings, Workers KV, Worker scripts, R2 bucket management, ruleset audits, Page Rules, and bulk redirect lists as workflow steps, authenticated with one scoped API token.

The Mattering Automations Cloudflare integration adds the Cloudflare API v4 to your automation canvas: list and manage zones and their settings, work DNS records with BIND zone-file export and import, purge the cache by URL, hostname, tag, prefix, or everything, read and write Workers KV from single values to 10,000-pair bulk operations, read deployed Worker scripts and edit their settings, manage R2 buckets, audit rulesets and the WAF read-only, manage Page Rules, and build the redirect lists behind Bulk Redirects.

The credential is a scoped API token created in the Cloudflare dashboard and sent as a Bearer header. Tokens carry permission groups and zone or account scopes you choose at creation, they are available on every Cloudflare plan including Free, and the legacy Global API Key is deliberately not accepted by this integration because it is unscoped and all-powerful. Setup takes a few minutes once the token exists, and this guide walks through each step, including which permission groups each node family needs, and ends with the full node reference.

The safety modeling is stated on the nodes rather than buried. Of the 56 nodes, 30 read and 26 act, and nine carry a destructive flag: Cloudflare: Delete Zone, Cloudflare: Delete DNS Record, Cloudflare: Delete KV Namespace, Cloudflare: Delete KV Value, Cloudflare: Bulk Delete KV Pairs, Cloudflare: Delete Worker Script, Cloudflare: Delete R2 Bucket, Cloudflare: Delete Page Rule, and Cloudflare: Delete List. Some write surfaces are deliberately absent: Worker code uploads stay in Wrangler or CI, ruleset writes are excluded because one bad call can replace a zone's entire WAF phase, and R2 object reads and writes belong to R2's separate S3-compatible API.

Before you start

  • A Cloudflare account with at least one zone (domain) added. API tokens are available on every Cloudflare plan, and a Free zone can exercise the DNS, zone settings, cache purge, Page Rules, and list nodes end to end.
  • For the Workers KV and Worker script nodes, a Workers setup on the account. Workers KV has a free tier (100,000 reads and 1,000 writes per day, 1 GB of storage), so KV-backed workflows can be built and tested without a paid plan.
  • For the R2 bucket nodes, R2 enabled on the account in the Cloudflare dashboard. Enabling R2 means completing Cloudflare's R2 subscription checkout flow; a free tier with 10 GB-month of storage is included once that is done, and the R2 nodes fail with a not-enabled error until it is.
  • A Mattering workspace with access to the Automations app.
  • Your account ID handy, or plan to fetch it with Cloudflare: List Accounts as the first step: the KV, Worker, R2, and list nodes are account-scoped and every one of them needs it.

Create a scoped Cloudflare API token

Mattering authenticates to Cloudflare with a scoped API token sent as a Bearer header on every request. A token only does what its permission groups allow: one scoped to DNS cannot purge cache or touch Workers KV, which is exactly the point, and it means the token you create must match the node families your workflows will use. The legacy Global API Key, the unscoped credential older Cloudflare tutorials describe, is deliberately not supported here.

Sign in at dash.cloudflare.com, open My Profile from the profile icon, and select API Tokens. For a token owned by the account rather than your user, use Manage Account, then API Tokens instead.
Click Create Token. Start from a template such as Edit zone DNS when one matches, or click Create Custom Token to choose permission groups yourself.
Add the permission groups for the node families you will use: DNS Edit for the DNS record nodes, Zone Read for listing zones (Edit if workflows create or delete zones), Zone Settings Edit for the settings nodes, Cache Purge Purge for cache purge, Page Rules Edit for Page Rules, Workers KV Storage Edit for the KV nodes, Workers Scripts Edit for the Worker script nodes, Workers R2 Storage Edit for R2 bucket management, Account Rulesets Read for ruleset audits, and Account Filter Lists Edit for the list nodes. One broad token also works; scoped-per-workflow tokens are the safer habit.
Under Zone Resources, scope the token to the specific zones your workflows touch, or to all zones on the account if the workflow is a sweep.
Click Continue to summary, review, and click Create Token.
Copy the token now. Cloudflare shows the secret once, on this screen only; after you leave, it can never be viewed again and your options are rolling it or making a new one.
Token permissions are the most common source of confusion later: the connection test passes for every valid token regardless of its permission groups, so a token can verify cleanly and still be refused by the node families it was never scoped for. If some nodes work and others return authorization errors, the token is missing that family's permission group.

Connect Cloudflare to Mattering

In Mattering Automations, open Connectors and click Add Connector.
Choose Cloudflare from the list.
Click Create new credential, paste the API token, and save.
The credential is stored encrypted in Google Secret Manager and never appears in workflow logs.
Click Test Connection. Mattering calls Cloudflare's token verification endpoint, which works for every scoped token regardless of permission groups: an active result proves the credential, an error means the token is mistyped, expired, or disabled.
Click Connect. All 56 Cloudflare nodes appear in your canvas palette.

Verify it works

After connecting, open any automation canvas and check the palette: a Cloudflare section should list the query and action nodes. Drop Cloudflare: Verify API Token onto the canvas and run a test step. It is the integration's universal probe: it works for every scoped token no matter how narrow, and a successful response returns the token's id, its active status, and its validity window without echoing the secret. If this node succeeds, the credential is healthy; anything failing after it is a permissions or parameters question, not an authentication one.

Next, run Cloudflare: List Zones and copy a zone ID, because every zone-level node (DNS, cache, settings, Page Rules, zone rulesets) needs one, then run Cloudflare: List Accounts and copy the account ID that the KV, Worker, R2, and list nodes need. One caution on a nearby node: Cloudflare: Get Current User only works for user-owned tokens that carry the User Details read permission, so an account-owned token failing there is expected and not a defect. Everything in this verify path is read-only: it cannot reach the nine destructive nodes or change a single setting, so it is safe to re-run whenever you rotate the token.

Node reference

56 nodes, generated from the connector itself so this reference always matches what ships.

Read and query nodes 30

Cloudflare: Export DNS Records

cloudflare_export_dns_records

Export the zone's complete DNS record set as a BIND zone file (plain text at data.content). The natural backup step before bulk changes, and the input format Cloudflare: Import DNS Records accepts.

Cloudflare: Get Account

cloudflare_get_account

Fetch one account: name, type, settings, and created date.

Cloudflare: Get Bulk Operation Status

cloudflare_get_bulk_operation

Poll an asynchronous list operation (from Add List Items) until its status is completed or failed.

Cloudflare: Get Current User

cloudflare_get_user

Fetch the user the token belongs to: id, email, name, and two-factor status. Requires a USER-owned token with User Details read permission; account-owned tokens get a permission error here (use Verify API Token instead).

Cloudflare: Get DNS Record

cloudflare_get_dns_record

Fetch one DNS record: type, name, content, TTL, proxy status, comment, and tags.

Cloudflare: Get KV Key Metadata

cloudflare_get_kv_metadata

Read the JSON metadata stored with a key, without fetching the value itself.

Cloudflare: Get List

cloudflare_get_list

Fetch one list's properties: kind, description, item count, and how many rules reference it.

Cloudflare: Get List Items

cloudflare_get_list_items

List a list's items - for a redirect list, each item's source URL, target URL, and status code. Cursor paginated.

Cloudflare: Get Page Rule

cloudflare_get_page_rule

Fetch one Page Rule: its URL match pattern, actions, priority, and status.

Cloudflare: Get R2 Bucket

cloudflare_get_r2_bucket

Fetch one R2 bucket's properties: creation date, location, and storage class.

Cloudflare: Get Worker Script

cloudflare_get_worker_script

Download a Worker's deployed source code as text at data.content (module Workers return the bundle content). Capped at 200,000 characters in the node output. Uploading new code stays in Wrangler or CI; this connector reads and manages but does not deploy.

Cloudflare: Get Worker Script Settings

cloudflare_get_worker_script_settings

Read a Worker's metadata settings: Logpush flag, tags, tail consumers, and observability configuration.

Cloudflare: Get Zone

cloudflare_get_zone

Fetch one zone: status, type, paused flag, assigned Cloudflare name servers, and account.

Cloudflare: Get Zone Phase Entrypoint

cloudflare_get_zone_entrypoint_ruleset

Fetch the zone's entry point ruleset for a phase, with its rules: what actually runs for that phase on live traffic. Returns 404 when the zone has no ruleset in the phase yet.

Cloudflare: Get Zone Ruleset

cloudflare_get_zone_ruleset

Fetch one zone ruleset INCLUDING its rules: each rule's action, filter expression, description, and enabled flag. The audit view of a zone's WAF custom rules.

Cloudflare: Get Zone Setting

cloudflare_get_zone_setting

Read one zone setting by its ID, for example ssl, security_level, cache_level, development_mode, always_use_https, or browser_cache_ttl.

Cloudflare: List Account Lists

cloudflare_list_account_lists

List the account's lists (redirect, ip, hostname, asn kinds) with item counts. Redirect lists are the storage half of Bulk Redirects.

Cloudflare: List Account Rulesets

cloudflare_list_account_rulesets

List account-level rulesets, including the Bulk Redirect phase (http_request_redirect) and Enterprise custom rulesets.

Cloudflare: List Accounts

cloudflare_list_accounts

List the Cloudflare accounts the token can access, with their account IDs. Almost every account-level node (KV, Workers, R2, lists) needs an account ID from here.

Cloudflare: List DNS Records

cloudflare_list_dns_records

List a zone's DNS records with filters on type, name, content, comment, and proxy status. Returns record IDs used by the get, update, and delete nodes.

Cloudflare: List KV Keys

cloudflare_list_kv_keys

List key names in a KV namespace, optionally filtered by prefix, with each key's expiration and metadata. Cursor paginated: pass data.result_info.cursor back to get the next page.

Cloudflare: List KV Namespaces

cloudflare_list_kv_namespaces

List the account's Workers KV namespaces with their IDs, which every KV key node needs.

Cloudflare: List Page Rules

cloudflare_list_page_rules

List a zone's Page Rules with their URL targets, actions, priority, and status. Page Rules is deprecated in favor of modern Rules but still served; Free zones get 3 rules.

Cloudflare: List R2 Buckets

cloudflare_list_r2_buckets

List the account's R2 buckets with creation date, location, and storage class. Bucket MANAGEMENT only: reading and writing objects uses R2's S3-compatible API with separate R2 credentials and is not part of this connector.

Cloudflare: List Worker Scripts

cloudflare_list_worker_scripts

List the account's deployed Worker scripts with names, handlers, usage model, and modification times.

Cloudflare: List Zone Rulesets

cloudflare_list_zone_rulesets

List a zone's rulesets (WAF custom rules, rate limiting, redirects, transforms) with id, kind, phase, and version. Read-only: this connector audits rulesets but does not write them.

Cloudflare: List Zone Settings

cloudflare_list_zone_settings

Read every setting on a zone in one call: SSL mode, security level, cache level, development mode, always_use_https, minify, and dozens more, each with its current value and whether the plan allows editing it.

Cloudflare: List Zones

cloudflare_list_zones

List zones (domains) the token can see, with zone IDs, status, plan, and name servers. Filter by domain name, status, or account. The zone ID from here feeds every zone-level node (DNS, cache, settings, rules).

Cloudflare: Read KV Value

cloudflare_read_kv_value

Read one key's stored value, returned verbatim as text at data.content (KV values are arbitrary bytes; JSON values arrive as a JSON string to parse downstream). A missing key returns 404. Values are capped at 200,000 characters in the node output.

Cloudflare: Verify API Token

cloudflare_verify_token

Check the stored API token: returns its id, active/disabled/expired status, and validity window. Works with every scoped token regardless of permissions, so this is the credential health check to run first in any Cloudflare automation.

Action nodes 26

Cloudflare: Add List Items

cloudflare_add_list_items

Append items to a list - for a redirect list, the bulk redirect entries themselves. Asynchronous: the response returns an operation_id to poll with Cloudflare: Get Bulk Operation Status.

Cloudflare: Bulk Delete KV Pairs

cloudflare_delete_kv_bulk

DESTRUCTIVE: delete up to 10,000 keys from a namespace in one call. All listed values are gone permanently.

Cloudflare: Bulk Write KV Pairs

cloudflare_write_kv_bulk

Write up to 10,000 key-value pairs in one call. Each item is an object with key and value plus optional expiration, expiration_ttl, metadata, and base64 fields. Existing keys are overwritten.

Cloudflare: Create DNS Record

cloudflare_create_dns_record

Create a DNS record in a zone: A, AAAA, CNAME, MX, TXT, NS, and the other supported types. Reversible with Cloudflare: Delete DNS Record. Structured types like SRV and CAA take their data object via Extra body fields.

Cloudflare: Create KV Namespace

cloudflare_create_kv_namespace

Create a Workers KV namespace. Reversible with Cloudflare: Delete KV Namespace.

Cloudflare: Create List

cloudflare_create_list

Create a list. kind=redirect makes a Bulk Redirect list (all plans: 5 lists and 10,000 URL redirects on Free); kind=ip makes an IP list usable in WAF expressions. Fill it with Cloudflare: Add List Items, then enable redirect lists via a Bulk Redirect rule in the dashboard.

Cloudflare: Create Page Rule

cloudflare_create_page_rule

Create a Page Rule: a URL pattern plus the actions applied to matching requests (forwarding_url redirects, cache_level, always_use_https, and more). Counts against the plan's quota (3 on Free). Reversible with Cloudflare: Delete Page Rule.

Cloudflare: Create R2 Bucket

cloudflare_create_r2_bucket

Create an R2 bucket (requires R2 to be enabled on the account). Reversible with Cloudflare: Delete R2 Bucket while the bucket is empty.

Cloudflare: Create Zone

cloudflare_create_zone

Add a domain to a Cloudflare account. The response includes the two Cloudflare name servers to set at the registrar; the zone stays pending until they are. Reversible with Cloudflare: Delete Zone.

Cloudflare: Delete DNS Record

cloudflare_delete_dns_record

DESTRUCTIVE: delete a DNS record. The name stops resolving as caches expire and the record's exact contents are gone unless captured beforehand (Cloudflare: Get DNS Record or Export DNS Records).

Cloudflare: Delete KV Namespace

cloudflare_delete_kv_namespace

DESTRUCTIVE: delete a KV namespace and EVERY key-value pair in it, permanently. Workers bound to the namespace start failing their KV calls.

Cloudflare: Delete KV Value

cloudflare_delete_kv_value

DESTRUCTIVE: delete one key-value pair from a namespace. The stored value is gone unless read beforehand.

Cloudflare: Delete List

cloudflare_delete_list

DESTRUCTIVE: delete a list and every item in it. Fails while rules still reference the list; remove those rules first. Redirects served from the list stop.

Cloudflare: Delete Page Rule

cloudflare_delete_page_rule

DESTRUCTIVE: delete a Page Rule permanently. Its redirect/cache behavior stops immediately and the rule configuration is gone unless read beforehand.

Cloudflare: Delete R2 Bucket

cloudflare_delete_r2_bucket

DESTRUCTIVE: delete an R2 bucket. The bucket must already be empty (R2 refuses to delete a bucket containing objects), but the bucket configuration and its name reservation are gone.

Cloudflare: Delete Worker Script

cloudflare_delete_worker_script

DESTRUCTIVE: delete a deployed Worker script permanently. Its routes stop being served and the code is gone from Cloudflare (keep the source in git). force=true also removes the script when other resources still reference it.

Cloudflare: Delete Zone

cloudflare_delete_zone

DESTRUCTIVE: remove a zone from Cloudflare. All DNS records, settings, and rules for the zone are deleted with it and cannot be restored; the domain stops resolving through Cloudflare immediately. Export DNS records first if there is any doubt.

Cloudflare: Edit Page Rule

cloudflare_edit_page_rule

Edit fields on an existing Page Rule; only the fields you fill are changed. Flipping status between active and disabled is the low-risk way to toggle a rule.

Cloudflare: Edit Worker Script Settings

cloudflare_edit_worker_script_settings

Edit a Worker's metadata settings without redeploying code: toggle Logpush, set tags, wire tail consumers, or configure observability. Only fields you fill are changed.

Cloudflare: Edit Zone

cloudflare_edit_zone

Edit zone properties: pause or unpause Cloudflare on the zone (paused bypasses the proxy entirely), change the setup type, or set vanity name servers. Only fields you fill are sent.

Cloudflare: Edit Zone Setting

cloudflare_edit_zone_setting

Change one zone setting, for example turn development_mode on, set security_level to under_attack during an incident, or set min_tls_version to 1.2. Reversible by writing the previous value back; read it first with Cloudflare: Get Zone Setting.

Cloudflare: Import DNS Records

cloudflare_import_dns_records

Import DNS records into a zone from BIND zone-file text (the format Export DNS Records produces). Adds records; it does not delete existing ones. Returns how many records were parsed and added.

Cloudflare: Purge Cache

cloudflare_purge_cache

Purge Cloudflare's cache for a zone. Fill EXACTLY ONE of: purge_everything, files (URLs), tags, hosts, or prefixes - all purge modes are available on every plan. A purge cannot be undone, but the cache refills from the origin on the next requests; purging everything on a busy site briefly raises origin load. Deploy-webhook to purge is the classic automation.

Cloudflare: Rename KV Namespace

cloudflare_rename_kv_namespace

Rename a KV namespace. The namespace ID and all stored data are unchanged, so Workers bound by ID keep working.

Cloudflare: Update DNS Record

cloudflare_update_dns_record

Update fields on an existing DNS record; only the fields you fill are changed. The classic dynamic-DNS move: point content at a new IP, or flip proxied on and off.

Cloudflare: Write KV Value

cloudflare_write_kv_value

Write a value to a key (creating or overwriting it), with optional JSON metadata and expiry. KV is eventually consistent: edge reads can serve the old value for up to about 60 seconds. Values up to 25 MB; metadata up to 1024 bytes.

Using the integration

On the automation canvas

Cloudflare nodes chain with every other node: a deploy webhook can run Cloudflare: Purge Cache by prefix for the paths that changed and then open a verification task in Mattering Productivity, a scheduled sweep can read Cloudflare: List Zone Settings across zones and write drift into a Mattering database, and Cloudflare: List DNS Records can feed a domain inventory that lives next to the rest of the work. The zone ID from Cloudflare: List Zones and the account ID from Cloudflare: List Accounts are the two values almost every downstream node asks for.

From AI assistants over MCP

Every node speaks MCP, the open protocol for connecting AI assistants to tools, so Claude, ChatGPT, and Matter can drive the same surface. An agent can read a zone with Cloudflare: List DNS Records, take a one-node backup with Cloudflare: Export DNS Records, repoint a record with Cloudflare: Update DNS Record, and clear the right cache with Cloudflare: Purge Cache. The read nodes are the safest surface to hand an agent; keep the nine destructive nodes behind conditions or approval steps.

DNS with the backup step built in

Cloudflare: Export DNS Records returns the zone's complete record set as BIND zone-file text, and running it before any bulk change is the habit that makes DNS automation calm. Cloudflare: Import DNS Records accepts that same format and adds the records back; note that import only adds, it never deletes existing records, so replaying an export onto a changed zone can produce duplicates rather than a reset. For single records, Cloudflare: Update DNS Record changes only the fields you fill, which is also the classic dynamic DNS move: point content at a new IP or flip proxied on and off.

Workers KV as shared state

Cloudflare: Write KV Value and Cloudflare: Read KV Value give automations and edge Workers a common store: a workflow writes a release id or a feature flag, and the Worker reads it on the next request. Cloudflare: Bulk Write KV Pairs loads up to 10,000 pairs in one call and Cloudflare: List KV Keys walks a namespace by prefix with cursor pagination. Two physical realities to plan around: KV is eventually consistent, so edge reads can serve an old value for up to about 60 seconds after a write, and value reads in the node output are capped at 200,000 characters even though stored values can be up to 25 MiB.

The nine destructive nodes, gated

Cloudflare: Delete Zone is the heaviest: it removes the zone with all its DNS records, settings, and rules, and the domain stops resolving through Cloudflare immediately, so export DNS first if there is any doubt. Cloudflare: Delete KV Namespace takes every stored pair with it and breaks Workers bound to it, Cloudflare: Bulk Delete KV Pairs removes up to 10,000 keys in one call, and Cloudflare: Delete Worker Script removes deployed code from Cloudflare entirely, so keep the source in git. The rest (Cloudflare: Delete DNS Record, Cloudflare: Delete KV Value, Cloudflare: Delete R2 Bucket, Cloudflare: Delete Page Rule, Cloudflare: Delete List) are smaller but equally final. The pattern for all nine is the same: read or export the thing first, and put the delete behind a condition, an approval task, or a manual run rather than a bare trigger.

What stays read-only or off the canvas

Four boundaries are deliberate. Ruleset writes are excluded because a mis-authored write replaces a zone's entire phase ruleset and can drop the WAF in one call; Cloudflare: List Zone Rulesets, Cloudflare: Get Zone Ruleset, Cloudflare: List Account Rulesets, and Cloudflare: Get Zone Phase Entrypoint make the audit side first-class instead (the entrypoint node returns 404 when the zone has no ruleset in that phase yet, which is normal). Worker code uploads stay in Wrangler or CI; the connector reads deployed code with Cloudflare: Get Worker Script and manages metadata with Cloudflare: Edit Worker Script Settings. R2 object reads and writes use R2's S3-compatible API with separate credentials, so the R2 nodes manage buckets only. And activating a redirect list built with Cloudflare: Create List and Cloudflare: Add List Items needs a Bulk Redirect rule enabled once in the Cloudflare dashboard, precisely because ruleset writes are off the canvas.

Troubleshooting

Test Connection fails with an invalid token error
The verification endpoint accepts every valid scoped token regardless of permissions, so a failure here is about the token itself. Check for leading or trailing whitespace from the copy, confirm the token was not rolled or deleted in the dashboard, and check its validity window: tokens can carry start and expiry dates, and an expired token fails verification exactly like a wrong one. If the credential you saved is the 37-character Global API Key from the bottom of the API Tokens page rather than a created token, that is the problem: this integration only accepts scoped API tokens.
Test Connection passes but some node families return authorization errors
The token is missing those families' permission groups. Verification works for every valid token no matter how narrow, so a DNS-only token passes the test and is then refused by cache purge, KV, or Workers nodes. Open the token at dash.cloudflare.com under My Profile, then API Tokens, edit it to add the missing permission groups (for example Cache Purge Purge, or Workers KV Storage Edit), or create a broader token and update the credential. Zone scoping matters too: a token limited to one zone returns authorization errors on every other zone.
Cloudflare: Get Current User fails while everything else works
That node requires a user-owned token carrying the User Details read permission, and account-owned tokens fail it by design, so this is expected behavior rather than a broken credential. Use Cloudflare: Verify API Token as the health check in workflows; it works for every token. Only reach for the user node when a workflow genuinely needs the token owner's email or id, and create the token under My Profile rather than Manage Account when it does.
Nodes start returning 429 during a large sweep
Cloudflare's global client API limit is 1,200 requests per 5 minutes per user, cumulative across the dashboard and every API token you own, and exceeding it blocks further calls for 5 minutes. A workflow paging through many zones or KV keys can reach it, and so can a workflow running while someone works the dashboard under the same user. The nodes report the 429 on their output rather than silently retrying, so add a wait step, spread scheduled sweeps apart, and prefer one filtered List call over many Get calls; removing requests beats delaying them.
Cloudflare: Purge Cache returns 429 while every other node is fine
Cache purge has its own throughput limits separate from the global API limit, and they scale by plan. On Free, purges by hostname, tag, prefix, or purge everything are limited to 5 requests per minute, with up to 100 operations per request; single-URL purges allow far higher volume. A deploy pipeline that fires several tag purges in quick succession on a Free zone hits this wall while DNS and settings nodes keep working. Batch purge targets into fewer requests (up to 100 tags or prefixes per call) or switch to single-URL purges for small deploys.
The R2 nodes fail on an account where everything else works
R2 must be enabled on the account before its management API answers: open R2 in the Cloudflare dashboard and complete the enablement flow, then the nodes resolve. Two more R2 specifics: the token needs the Workers R2 Storage permission group, which templates for other families do not include, and Cloudflare: Delete R2 Bucket refuses to delete a bucket that still contains objects, so empty it first through R2's own tooling since object operations are outside this integration.
A redirect list is created and filled but the redirects do not serve
Two separate causes stack here. First, Cloudflare: Add List Items is asynchronous: it returns an operation_id, and the items are not in the list until Cloudflare: Get Bulk Operation Status reports the operation completed, so poll before judging. Second, a redirect list only acts once a Bulk Redirect rule references it, and that rule lives in the account's redirect phase ruleset, which this integration deliberately does not write. Enable the rule once in the Cloudflare dashboard under the Bulk Redirects interface; from then on, workflows can manage the list's contents freely and the rule keeps serving them.
Cloudflare: Read KV Value returns an old value right after a write
That is Workers KV behaving as documented rather than a fault: KV is eventually consistent, and reads can serve a previous value for up to about 60 seconds after a write, longer for a key being read at high volume in many locations. Workflows that write and immediately read back should either tolerate the stale window, add a wait step before verifying, or treat the write node's own success response as the confirmation. When a workflow needs strict read-after-write behavior, KV is the wrong store for that key; keep such state in a Mattering database instead.

Cloudflare is a trademark of its respective owner. Mattering uses platform names to identify the services these integrations connect to; no endorsement or affiliation is implied.

Start Free Explore our Products