Description
n8n Execution Datastore Node
An n8n node that provides execution-scoped in-memory key-value storage with automatic cleanup. Perfect for sharing data within a single workflow execution without persistence or cross-execution contamination.
🎯 What Makes This Different?
Unlike traditional datastores or getWorkflowStaticData(), this node provides:
- Execution-Scoped Storage: Data exists only during the current workflow execution
- Automatic Cleanup: Memory is automatically freed when execution completes or is cancelled
- Execution Isolation: No data leakage between concurrent executions
- Zero Configuration: No database setup, no persistence headaches
🚀 Use Cases
- Temporary Data Storage: Pass data between workflow branches without cluttering your items
- Accumulation Patterns: Collect data from loops or splits, then process together
- State Management: Track execution state across multiple nodes
- Race Condition Prevention: Isolated storage per execution prevents concurrent workflow conflicts
📦 Installation
Via n8n Community Nodes
- Go to Settings → Community Nodes
- Click Install
- Enter
n8n-nodes-executiondatastore - Acknowledge security risks and proceed with installation
The node will appear as "Datastore" in your node search.
Via npm (for self-hosted n8n)
npm install n8n-nodes-executiondatastore
🔧 Operations
Set
Store a value associated with a key (string or JSON).
Parameters:
Key Name: Unique identifier for the dataValue Data Type: ChooseStringorJSONValue: The data to store
Get
Retrieve a stored value using its key.
Parameters:
Key Name: The key to retrieve
Returns:
key: The key namevalue: The stored value (ornullif not found)found: Boolean indicating if the key exists
Clear
Remove a specific key-value pair.
Parameters:
Key Name: The key to remove
Clear All
Remove all stored data for this execution.
💡 Usage Examples
Example 1: Simple Data Passing
[HTTP Request] → [Datastore: Set] → [Some Processing] → [Datastore: Get] → [Email]
Store API response temporarily, process it elsewhere, then retrieve for emailing.
Example 2: Loop Accumulation
[Split In Batches] → [Process Item] → [Datastore: Set (JSON)]
↓
[Accumulate results]
↓
[Datastore: Get] → [Send to API]
Collect processed results from a loop, then send all at once.
Example 3: Conditional State Tracking
[IF Node] → [Branch A: Datastore: Set "status"="A"]
↘
→ [Branch B: Datastore: Set "status"="B"]
↓
[Both branches merge]
↓
[Datastore: Get "status"] → [Different action based on status]
Track which branch was taken for later decision-making.
Example 4: Array Storage
When setting multiple items with the same key and JSON type, the node automatically stores them as an array:
Input: 3 items, all with key "users", each with different JSON data
Stored as: { "users": [json1, json2, json3] }
On Get: Returns 3 separate items, one for each array element
🎨 Output Options
For Set, Clear, and Clear All operations, choose how data flows through:
- Pass Through (default): Smart mode – preserves input data unless it's empty or from another datastore operation
- Output Key: Returns
{ success: true, operation: "set", key: "keyName" } - Output Value: Returns
{ success: true, operation: "set", value: storedValue } - Output Key-Value: Returns
{ keyName: storedValue }
⚡ How Auto-Cleanup Works
The node automatically cleans up memory in two scenarios:
- Execution Completion: Data is removed ~1 second after successful execution
- Execution Cancellation: Data is immediately removed if execution is cancelled
This ensures:
- No memory leaks
- No cross-execution contamination
- No manual cleanup required
🔒 Execution Isolation Guarantee
Each workflow execution gets its own isolated storage namespace:
Execution #1 stores: "user" = "Alice"
Execution #2 stores: "user" = "Bob"
Execution #1 reads: "user" = "Alice" ✅
Execution #2 reads: "user" = "Bob" ✅
No cross-contamination!
⚠️ Important Considerations
Memory Only
- No Persistence: Data is lost when n8n restarts
- In-Memory Storage: All data stored in RAM (use for reasonably-sized data)
- No Cross-Execution Access: You cannot access data from previous executions
Best Practices
- Use for temporary execution state, not long-term storage
- Keep stored data reasonably sized (MBs, not GBs)
- For persistent storage, use a database node
- For cross-execution data sharing, use
getWorkflowStaticData()or a database
When NOT to Use This Node
- ❌ Persistent storage needs
- ❌ Cross-execution data sharing
- ❌ Cross-workflow data sharing
- ❌ Large dataset storage (GBs)
When TO Use This Node
- ✅ Temporary execution state
- ✅ Data passing between workflow branches
- ✅ Loop/batch accumulation
- ✅ Race condition prevention
- ✅ Simplifying complex workflows
🆚 Comparison with Alternatives
| Feature | Execution Datastore | getWorkflowStaticData() |
Database |
|---|---|---|---|
| Persistence | ❌ Execution only | ✅ Until n8n restart | ✅ Permanent |
| Auto-cleanup | ✅ Yes | ❌ No | ❌ No |
| Execution isolation | ✅ Yes | ❌ No | ⚠️ Manual |
| No-code | ✅ Yes | ❌ Requires Code node | ✅ Yes |
| Setup required | ✅ None | ✅ None | ❌ DB setup |
🐛 Troubleshooting
"Unable to get execution ID" Error
This node requires an active execution context. It cannot be used in:
- Static test scenarios without execution IDs
- Certain edge cases where execution context is unavailable
Data Not Found
- Ensure you're using the exact same key name for Set and Get
- Remember: data is execution-scoped and auto-cleaned after execution
- Check that the Set operation completed successfully before Get
Memory Concerns
If storing very large data:
- Monitor n8n memory usage
- Consider streaming data through items instead of storing
- Use a database for large datasets
📚 Related Resources
- n8n Documentation
- n8n Community Forum
- Original Datastore Node (for comparison)
🤝 Contributing
Issues and pull requests welcome at the GitHub repository!
📄 License
Made with ❤️ for the n8n community
This node is specifically designed for execution-scoped temporary storage. For persistent data or cross-execution sharing, consider using n8n's built-in database nodes or workflow static data.