Cloudflare Workers KV logo

Databases

Cloudflare Workers KV Integrations

Connect Workers KV to the tools that maintain your website. Publish a redirect table from Google Sheets, point to new R2 release files and expire temporary announcements automatically.

Start a workflow

Cloudflare Workers KV Triggers

2 Instant

Choose what starts your automation.

A KV namespace was created

Instant

Start a workflow when Cloudflare creates a namespace in the connected account.

A KV namespace was deleted

Instant

Start a workflow when Cloudflare removes a namespace. The notification includes its last name and identifier.

Then take action

Cloudflare Workers KV Actions

20 Actions

Choose what your workflow does in Cloudflare Workers KV.

Analyze KV operations

Compare reads, writes, deletes and lists over the selected time period.

Analyze KV storage

Track stored bytes and key counts across your namespaces.

More actions

Back up keys by prefix

Export matching keys, binary values, metadata and absolute expiry times to a JSON file for restoration.

Create a KV namespace

Create a named collection for your application’s keys and values.

Delete a batch of keys

Remove the named keys in one request and inspect any unsuccessful keys.

Delete a namespace and its keys

Permanently remove the selected namespace and all values stored in it.

Delete keys with the legacy API

Use the older bulk deletion endpoint for existing integrations. For new workflows use Delete a batch of keys.

Delete one key

Remove the selected key, its stored value and its metadata.

Explore KV analytics columns

Look up the columns, types and filters available for KV request analytics.

Get namespace details

Look up the name, mode and identifier of one KV namespace.

List keys by prefix

Browse key names, expiration times and metadata. Use the returned cursor to read the next page.

List KV namespaces

Find the namespaces in your account and page through their names and identifiers.

Publish verified redirect rules

Check every source and destination before replacing the active redirect table in a single write. A conflicting row leaves the previous table available.

Query KV requests with SQL

Explore KV request activity using a time-bounded SQL query.

Read a batch of values

Look up up to 100 keys together, optionally returning metadata with each value.

Read a stored value

Retrieve one key as text or as a file that preserves the original bytes.

Read key metadata

Retrieve the JSON metadata attached to one key without downloading its value.

Rename a KV namespace

Change the display name of a namespace while keeping its identifier and keys.

Store a value with an optional expiry

Write text or binary data under one key. Optionally attach JSON metadata or set an expiration time.

Write a batch of keys

Store multiple values in one request, with per-key metadata, encoding and expiration.

Ready-made Cloudflare Workers KV Workflows

21 total

Start with a published template and adapt it to your work.

Browse all templates →
Cloudflare Workers KV →
More templates

Cloudflare Workers KV setup notes

  • Choose the namespace for each step Connect with a Cloudflare account ID and a token with Workers KV Storage access. Editing a namespace or its keys requires Edit on the account. Analytics queries need Account Analytics Read.

  • Receive namespace events Subscribe a Cloudflare Queue to namespace creation and deletion and attach the FastHook relay. These events describe changes to namespaces. Key writes in the templates start from Sheets, R2, a schedule or a private webhook.

  • Plan for propagation and recovery Standard KV caches values across locations. Allow time for updates to reach readers. Back up an application prefix to R2 and verify the archive in a separate namespace before using it for recovery.