Overview
This node manages persistent global data storage across workflows in n8n. It allows users to perform operations such as deleting, getting, setting, incrementing, and listing key-value pairs stored persistently. The data can be stored either in a JSON file on disk or within the workflow's or node's static data.
A common use case is to maintain counters, flags, or shared configuration values that need to persist beyond a single workflow execution. For example, you could keep track of how many times a particular event has occurred or store a token that multiple workflows need to access.
The Delete operation specifically removes a given key from the selected storage, effectively erasing its associated value.
Properties
| Name | Meaning |
|---|---|
| Storage | Where to keep persistent data. Options: File (JSON file on disk), Node (node static data), Workflow (workflow static data). |
| Key | The key name of the global variable to delete. |
| Store File Path | Optional path to the JSON file used for persistent storage when Storage is set to File. Defaults to the user n8n folder globals.json file. |
Output
The output is an array with one item per input item processed. Each output item contains a json object with the following structure:
key: The key that was requested for deletion.deleted: A boolean indicating whether the key existed and was successfully deleted (true) or if the key did not exist (false).
Example output JSON:
{
"key": "myGlobalKey",
"deleted": true
}
No binary data is produced by this node.
Dependencies
- Requires access to the filesystem if using
Filestorage, with appropriate read/write permissions. - When using
NodeorWorkflowstorage, requires the node to be executed within an active workflow context (not manual runs). - No external API keys or services are required.
Troubleshooting
- Missing Key Error: If the
Keyproperty is empty or missing, the node will throw an error stating that the key is required. - File Access Issues: When using file storage, ensure the specified file path is accessible and writable by n8n. Permission errors or invalid paths may cause failures.
- Unsupported Operation: If an unsupported operation is specified, the node throws an error indicating so.
- Static Data Usage: Using
NodeorWorkflowstorage requires running inside an active workflow; otherwise, the static data may not be available, leading to unexpected results. - Continue On Fail: If enabled, errors for individual items will be returned in the output instead of stopping execution.
Links and References
- n8n Documentation - Static Data
- Node.js fs module (for understanding file operations)
- n8n Workflow Context