//Pułapki n8n · wysoka
$getWorkflowStaticData global loses data in loops
When looping via Code → HTTP Request → Code → If → back to HTTP Request, the HTTP Request node overwrites $json with the API response. Any loop state passed via $json (iteration counter, accumulated data) is lost on every iteration. Fix: use $getWorkflowStaticData('global') to persist loop state across iterations. Always reset staticData at the start of each workflow run because it persists across runs (saved to DB) — stale data from failed executions can leak in otherwise.
- Kategoria
- n8n_general
Źródło: lista pułapek n8n-mcp, którą utrzymuje autor narzędzia · Treść w oryginale, po angielsku, w formie, w jakiej trafia do agenta.
Błędy, które agenci AI popełniają w n8n
- Execute Workflow + Wait nodes cause data loss
- SplitInBatches + Wait nodes cause state loss
- Never use append on sheets with formula columns
- $env expressions blocked in Code nodes
- saveExecutionProgress fills disk space
- IF node uses branch true/false not sourceIndex
- Code node $input.all() vs $input.first()
- Per-item execution on large datasets
- Webhook node response must be sent explicitly
- Error Trigger workflow must be separate