n8n

How to Streamline Cloudflare KV Data Management?

Run key value storage tasks in one place. Manage Cloudflare Workers KV namespaces and keys from n8n without scripts. Ideal for IT and dev teams that need fast changes across environments.

Work starts with a manual trigger. A shared Account Path stores your Cloudflare account ID. HTTP Request nodes call the Cloudflare API to list, create, rename, and delete namespaces. Other paths list keys, read values and metadata, write single or many keys, and delete one or many keys. Set nodes help you choose the right namespace and key by name, which reduces mistakes and keeps actions consistent.

Add your Cloudflare API token and account identifier, then edit the Set nodes for your namespace names. Use it for routine cleanups, config seeding, feature flags, and cache refreshes. Expect faster updates, fewer errors, and less context switching between tools.

What are the key features?

  • Manual trigger runs storage maintenance on demand
  • Account Path set node stores the Cloudflare account identifier used by all requests
  • List, create, rename, and delete namespaces through Cloudflare API calls
  • List keys in a selected namespace to see what is stored
  • Read a key value and read key metadata for quick checks
  • Write a key with metadata to keep extra context with the value
  • Write multiple key value pairs in one request to speed up updates
  • Delete a single key or remove many keys in bulk to clean up fast

What are the benefits?

  • Reduce manual work from hours of API calls to minutes with one place to run tasks
  • Automate up to 80% of repetitive KV changes across test, staging, and production
  • Improve accuracy by using a single account path and name search to pick the right namespace
  • Handle large volumes with bulk write and bulk delete for thousands of keys
  • Unify Cloudflare storage actions with your other n8n jobs for smoother operations

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with Cloudflare. See the Tools Required section above for links to create accounts with these services.
  3. In your Cloudflare dashboard, create an API Token with permissions for Workers KV Storage read and edit at the account level. Copy the API token and your Cloudflare Account ID.
  4. In n8n, double click any Cloudflare HTTP Request node such as List KV NMs. In the Credential to connect with dropdown, click Create new credential, choose Cloudflare API, then follow the on screen steps to add your API token.
  5. Open the Account Path Set node and replace the sample account identifier with your own Account ID from Cloudflare. Save the node.
  6. Test the connection: select the List KV NMs node and click Execute Node. You should see your namespaces in the output.
  7. Create a namespace: open the Create KV NM node, enter a title for the namespace, and run the node. Confirm it appears by running List KV NMs again.
  8. Write a single key with metadata: set the target namespace in the Set KV NM Name node used by Write V & MD of KV In NM, enter a key, value, and metadata, then execute the write node.
  9. Bulk write keys: choose the namespace in the Set KV NM Name node tied to Write KVs inside NM, add several key value pairs in the node, and run it.
  10. Verify data: run the -Get Keys inside NM node to see keys, then use Read Value Of KV In NM and Read MD from Key to check value and metadata.
  11. Clean up: use Delete KV inside NM to remove a single key or Delete KVs inside NM to remove many keys. Confirm with -Get Keys inside NM.
  12. Rename a namespace: fill in previous and new names in the KV to Rename set node, then run the rename HTTP Request node. Check with List KV NMs to confirm.
  13. Troubleshooting: If you see 403 errors, verify the API token scopes and the Account ID. If a namespace is not found, check the exact title. If you hit rate limits, wait and retry with smaller batches.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

Cloudflare

Sign up

Workers Free plan: $0 / mo; includes Workers KV 100,000 reads/day, 1,000 writes/day, 1,000 deletes/day, 1,000 list requests/day, 1 GB storage

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.