Actions9
- Namespace Actions
- Key-Value Actions
Overview
This node integrates with Cloudflare Workers KV, a globally distributed key-value storage system. It allows users to perform various operations on namespaces and key-value pairs within those namespaces. Specifically, the "Get Multiple" operation under the "Key-Value" resource retrieves multiple values by their keys from a specified namespace.
Common scenarios include:
- Fetching multiple configuration values or feature flags stored in Cloudflare KV for use in workflows.
- Retrieving cached data entries identified by multiple keys simultaneously.
- Aggregating several related pieces of data stored as separate keys in a single request.
For example, you might store user preferences or session data keyed by user IDs and retrieve multiple users' data at once using this operation.
Properties
| Name | Meaning |
|---|---|
| Namespace ID | The ID of the KV namespace from which to retrieve the values. |
| Keys | Comma-separated list of keys whose values you want to fetch from the namespace. |
Output
The output JSON contains a results array where each element corresponds to one requested key. Each element includes:
key: The key string requested.value: The value stored for that key (string). If the key does not exist, this isnull.metadata: Optional JSON metadata associated with the key-value pair if present.error: Present only if the key was not found, with the message"Key not found".
Example output structure:
{
"results": [
{
"key": "key1",
"value": "some value",
"metadata": { /* optional metadata object */ }
},
{
"key": "key2",
"value": null,
"error": "Key not found"
}
]
}
No binary data output is produced by this operation.
Dependencies
- Requires an API authentication token credential for Cloudflare API access.
- Needs the Cloudflare account ID and API token configured in the node credentials.
- Makes HTTP requests to the Cloudflare API endpoint for KV namespaces and values.
Troubleshooting
- Key Not Found: If a requested key does not exist, the node returns an error field for that key but continues processing other keys.
- Invalid Namespace ID: Using an incorrect or unauthorized namespace ID will cause API errors.
- API Authentication Errors: Ensure the API token has sufficient permissions to read KV namespaces and values.
- Rate Limits: Cloudflare API rate limits may cause request failures; consider retry logic or reducing batch size.
- Malformed Keys Input: Keys must be comma-separated strings without extra spaces; improper formatting may cause unexpected results.
If the node throws an error with an HTTP code, check the error message for details such as permission issues or invalid parameters.