What problem does it solve?
It prevents Code node failures and confusion by teaching the correct JavaScript patterns, data access methods, and return formats for n8n’s Code node environment.
Core Features & Use Cases
- Mode selection guidance: choose between Run Once for All Items vs Run Once for Each Item based on dataset vs per-item logic needs.
- Data access patterns: use $input.all(), $input.first(), $input.item, and $node references correctly, including the common webhook gotcha under $json.body.
- Return format correctness: reliably output the required array of items with the json property to keep downstream workflow steps working.
- Production-ready error prevention: avoid the most frequent Code node mistakes like missing return statements, incorrect wrappers, expression syntax confusion, null/undefined access, and sandbox restrictions.
- Built-in function usage: correctly apply $helpers.httpRequest(), DateTime (Luxon), $jmespath(), and $getWorkflowStaticData() within the Code node’s constraints.
Quick Start
Ask: “Turn my webhook payload into a normalized list of users in an n8n Code node, using All Items mode, with safe null checks, and return the data as [{json: {...}}].”