Actions9
- Namespace Actions
- Key-Value Actions
Overview
This node integrates with Cloudflare Workers KV, a key-value storage system, allowing users to manage namespaces and store or retrieve key-value pairs. It is useful for scenarios where you need fast, globally distributed storage for configuration data, feature flags, session data, or any other small pieces of information that require low-latency access.
For the Namespace Create operation specifically, the node creates a new namespace in Cloudflare Workers KV. This is beneficial when organizing key-value pairs into separate logical groups or environments. For example, you might create different namespaces for development, staging, and production data isolation.
Properties
| Name | Meaning |
|---|---|
| Namespace Title | A human-readable name for the namespace |
Output
The output JSON contains the response from the Cloudflare API after creating a namespace. Typically, it includes details about the newly created namespace such as its ID and title. The exact structure depends on the Cloudflare API response but generally confirms successful creation and provides metadata about the namespace.
Example output snippet:
{
"result": {
"id": "namespace-id",
"title": "Your Namespace Title",
...
},
"success": true,
"errors": [],
"messages": []
}
No binary data is produced by this operation.
Dependencies
- Requires an active Cloudflare account.
- Needs an API authentication token with permissions to manage Workers KV namespaces.
- The node expects credentials configured in n8n for accessing the Cloudflare API (an API key/token and account ID).
- Network connectivity to
https://api.cloudflare.comis required.
Troubleshooting
Common issues:
- Invalid or missing API token: The request will fail authorization.
- Insufficient permissions: The API token must have rights to create namespaces.
- Rate limiting by Cloudflare API if too many requests are made in a short time.
- Providing an empty or invalid namespace title will cause the API to reject the request.
Error messages:
- Errors returned by the Cloudflare API are passed through. For example,
"message": "Invalid API token"indicates credential problems. - HTTP errors like 400 or 403 indicate bad input or permission issues.
- Errors returned by the Cloudflare API are passed through. For example,
Resolution tips:
- Verify API token validity and scope.
- Ensure the namespace title is non-empty and valid.
- Check network connectivity.
- Enable "Continue On Fail" in the node settings to handle errors gracefully during batch executions.