Steps
Know which mode you are in: editor runs throw, production runs stay silent
We ran 23 executions of the Execution Data node (v1.1, plus v1 once) on n8n 2.43.7 with
n8n execute, which is not a manual run, and read what was stored in the database. Every bad key or value was dropped with a green node and no error. Reading the n8n source (custom-data.jsin n8n-core), the same mistakes throw only in a manual run from the editor:Custom data key can only contain letters, numbers, and underscoresandCustom data values must be a string. In production (a trigger, a schedule, the CLI) they are just a debug log line. So a workflow can fail when you test it and pass silently in production, with nothing saved. We could not run manual mode from the CLI, so the editor errors come from the source, not from our runs.Use only letters, numbers and underscores in keys
Keys
order id(space) andorder-id(dash) were never saved.order_idandorderIdworked. Keys longer than 50 characters were cut to 50, and an empty key was accepted, so check spelling: a later filter onorderidwill not findorderId.Turn every value into a string
Numbers were stored as strings (
42became"42"). Booleans ({{ true }}), objects ({{ $json.obj }}) and arrays ({{ $json.tags }}) were not saved at all. Wrap them:{{ String($json.paid) }},{{ $json.tags.join(',') }}or{{ JSON.stringify($json.obj) }}. Plain strings always saved in our runs; we did not run theJSON.stringifyversion itself. Values longer than 512 characters are cut to 512, so save an id, not a whole payload.Several items: only the last value survives
The node runs once per item and the custom data belongs to the whole execution. With 3 items (
A-1,A-2,A-3) and keyorderId, onlyA-3was stored. If you need all of them, put an Aggregate node before it and save{{ $json.orderId.join(',') }}, or save a count instead. The same key twice in one node also keeps only the last row.Stay under 10 keys per execution
With 11 keys,
k0tok9were saved and the 11th was dropped with no warning. Per the source this limit is silent even in manual runs. Merge related values into one key if you need more.Expression mode, not Fixed, and check for empty values
In Fixed mode the text
{{ $json.orderId }}was stored literally, braces included. Switch the Value field to Expression. A field that does not exist ({{ $json.nope }}) saved""without an error, and so did an empty value, so an empty column in the Executions list usually means a wrong field path, not a broken node. See n8n expression errors and undefined values.The node needs at least one item
When the node before it returned no items, the Execution Data node never ran and nothing was saved. Put it on a branch that always has an item, or turn on Always Output Data on the node before it. With Continue On Error on, a bad key still gave no error item, just no data.
Code node: $execution.customData has the same rules
In a Code node,
$execution.customData.set('total', 42)stored"42",set('flag', true)was ignored,setAll({a:'1', b:{c:1}})saved onlya, andget('nope')returnedundefined. A later node can read everything with$execution.customData.getAll(). More Code node traps: n8n Code node errors.Saved but you cannot filter on it? That is the plan, not a bug
The node's own notice says filtering executions by custom data in the Executions list needs a Pro or Enterprise plan. On Community the data was still saved in every run, you just cannot search the list by it. You can still read it in an error workflow or a sub-workflow with
$execution.customData.
All 23 test results
| What we saved | What n8n stored |
|---|---|
One item, key orderId, value {{ $json.orderId }} | Saved: {"orderId":"A-1"}, items passed through unchanged |
3 items, same key orderId | Only the last value saved: "A-3" |
Number {{ $json.total }} (42) | Saved as the string "42" |
Boolean {{ true }} | Not saved, node green |
Object {{ $json.obj }} | Not saved, node green |
Array {{ $json.tags }} | Not saved, node green |
Key with a space (order id) | Not saved, node green |
Key with a dash (order-id) | Not saved, node green |
| 11 keys in one execution | k0 to k9 saved, the 11th dropped, no warning |
| Key of 60 characters | Cut to 50 characters |
| Value of 600 characters | Cut to 512 characters |
| Empty value | Saved as "" |
Missing field {{ $json.nope }} | Saved as "", no error |
| Empty key | Accepted and saved |
Fixed mode with {{ $json.orderId }} | Saved the literal text {{ $json.orderId }} |
| Zero input items | Node never runs, nothing saved |
| Continue On Error on, bad key | No error item, just no data |
| Same key twice in one node | Last row wins |
Code node $execution.customData.set('total', 42) | Saved as "42" |
Code node set('flag', true) | Ignored silently |
Code node setAll({a:'1', b:{c:1}}) | Only a saved |
Code node get('nope') | undefined |
Read in a later node with $execution.customData.getAll() | Returns every saved key |
Code node: save values safely
This turns any value into a string, keeps keys to letters, numbers and underscores, and stops at 10 keys, so nothing is dropped silently (written from the rules above; this exact snippet was not run):
const src = $input.first().json;
const out = {};
for (const [k, v] of Object.entries(src)) {
if (Object.keys(out).length === 10) break;
const key = k.replace(/[^A-Za-z0-9_]/g, '_').slice(0, 50);
const val = typeof v === 'string' ? v : JSON.stringify(v);
out[key] = (val ?? '').slice(0, 512);
}
$execution.customData.setAll(out);
return $input.all();Checklist
- Keys: letters, numbers, underscores only, 50 characters max, 10 per execution.
- Values: strings only, wrap booleans, objects and arrays; 512 characters max.
- Value field in Expression mode.
- One item reaches the node (aggregate first if there are many).
- Filtering in the Executions list needs Pro or Enterprise.
Good to know
- Alerting on failed runs with this data? See n8n error workflow not triggering.
- Passing data to a sub-workflow instead: n8n Execute Workflow.
- Every error text from our n8n guides is in the n8n error message index.
What we did not test
Manual runs from the editor (the error messages above are from the source), the Executions list filter on Pro or Enterprise, n8n Cloud, queue mode, and Postgres instead of SQLite.
Start from a working agent
FAQ
Why is my n8n Execution Data node not saving anything?
Usually a key with a space or dash, or a value that is a boolean, object or array. Outside the editor n8n drops them silently with a green node. Use letters, numbers and underscores, and wrap values in String() or JSON.stringify().
How many custom data keys can an n8n execution have?
10. In our test the 11th key was dropped with no warning. Keys are cut to 50 characters and values to 512.
Why does n8n save only the last item in Execution Data?
Custom data belongs to the whole execution, and the node runs once per item, so each item overwrites the same key. Aggregate the items first and save a joined value.
Can I filter n8n executions by custom data for free?
The data is saved on every plan, but filtering the Executions list by it needs Pro or Enterprise, according to the node notice.
How do I read custom data later in the same workflow?
Use $execution.customData.get('key') or $execution.customData.getAll() in an expression or a Code node.
Can I set n8n custom data from a Code node?
Yes, with $execution.customData.set('key', 'value') or setAll({...}). The same rules apply: string values only, valid keys, 10 keys max.
Related guides
- n8n Supabase node errors: credentials, RLS and filter fixes, 41 runs
- n8n static data not saving? 35 runs, every cause found
- n8n JWT node not working: missing exp, Bearer, invalid algorithm, 54 runs
- n8n expression errors and empty values: 29 tests, every message explained
- Get Steam wishlist price-drop alerts in Discord (free, no API key)
New guides
- GitHub release notifications in Slack (any public repo, stable releases only)
- Send RSS feeds to Slack with a keyword filter (free, incoming webhook)
- Forward emails to a Slack channel (Gmail, Outlook, any IMAP), free with an incoming webhook
- n8n Google Sheets Trigger not working: not firing, activation errors and fixes