Cloudflare KV icon

Cloudflare KV

Store and retrieve data from Cloudflare Workers KV.

Overview

This node integrates with Cloudflare Workers KV, a globally distributed key-value storage system. It allows users to manage key-value pairs within specified namespaces on Cloudflare's platform. The "Delete" operation for the "Key-Value" resource specifically deletes a single key-value pair from a given namespace.

Common scenarios where this node is beneficial include:

  • Removing outdated or sensitive data stored in Cloudflare KV.
  • Managing cache invalidation by deleting specific keys.
  • Cleaning up keys after certain workflows complete.

For example, if you have stored user session data or feature flags in Cloudflare KV, you can use this node to delete a particular key when it is no longer needed.

Properties

Name Meaning
Namespace ID The identifier of the Cloudflare KV namespace where the key-value pair resides.
Key The specific key within the namespace that you want to delete.

Output

The output JSON contains a confirmation of the deletion operation:

{
  "success": true,
  "key": "the-deleted-key"
}
  • success: A boolean indicating whether the deletion was successful.
  • key: The key that was deleted.

No binary data is output by this operation.

Dependencies

  • Requires an API authentication token credential for Cloudflare with permissions to access and modify Workers KV namespaces.
  • The node makes HTTP requests to the Cloudflare API endpoint for KV storage under the account's namespaces.
  • Proper configuration of the Cloudflare account ID and API token is necessary in the node credentials.

Troubleshooting

  • Key Not Found: If the specified key does not exist, the Cloudflare API may return a 404 error. This node treats such cases as errors unless handled explicitly.
  • Invalid Namespace ID: Providing an incorrect or non-existent namespace ID will cause the API request to fail.
  • Authentication Errors: Ensure the API token has sufficient permissions and is correctly configured.
  • Rate Limits: Cloudflare enforces rate limits; excessive requests may result in throttling errors.
  • Error Messages: The node surfaces error messages returned by the Cloudflare API. Common messages include authorization failures, invalid parameters, or network issues.

To resolve errors:

  • Verify the namespace ID and key values are correct.
  • Check API token permissions and validity.
  • Handle errors gracefully using the node's "Continue On Fail" option if appropriate.

Links and References

Discussion