n8n-code-javascript
Write JavaScript code in n8n Code nodes. Use when writing JavaScript in n8n, using $input/$json/$node syntax, making HTTP requests with $helpers, working with dates using DateTime, troubleshooting Code node errors, or choosing between Code node modes.
Target: AI & workflow automation. Automatically collected · unverified.
Excerpt from the author’s documentation
Extracted from a fixed version of SKILL.md in its original language. This is the author’s documentation; installation, compatibility and runtime results have not been verified by this site.
Read the original English text
Topics in the source
- JavaScript Code Node
- Quick Start
- Essential Rules
- Mode Selection Guide
- Run Once for All Items (Recommended - Default)
- Run Once for Each Item
- Data Access Patterns
- Pattern 1: $input.all() - Most Common
Expert guidance for writing JavaScript code in n8n Code nodes. -- 1. Choose "Run Once for All Items" mode (recommended for most use cases) 2. Access data: $input.all(), $input.first(), or $input.item 3. CRITICAL: Must return [{json: {...}}] format 4. CRITICAL: Webhook data is under $json.body (not $json directly) 5. Built-ins available: $helpers.httpRequest(), DateTime (Luxon), $jmespath() -- The Code node offers two execution modes. Choose based on your use case: Use this mode for: 95% of use cases How it works: Code executes once regardless of input count Data access: $input.all() or items array Best for: Aggregation, filtering, batch processing, transformations, API calls with all data Performance: Faster for multiple items (single execution) When to use: ✅ Comparing items across the dataset ✅ Calculating totals, averages, or statistics ✅ Sorting or ranking items ✅ Deduplication ✅ Building aggregated reports ✅ Combining data from multiple items Use this mode for: Specialized cases only How it works: Code executes separately for each input item Data access: $input.item or $item Best for: Item-specific logic, independent operations, per-item validation Performance: Slower for larg
This is an excerpt. Refer to the complete source and its current requirements.
- Source repository
- davila7/claude-code-templates
- Source file
- cli-tool/components/skills/workflow-automation/n8n/n8n-code-javascript/SKILL.md
- Fixed revision
- 21be197f100a12b8d0dd9a211cc244c8179f84d3
Sources and evidence
This record was collected automatically. Its documentation, suitability and runtime behavior have not been manually verified.
Author: davila7/claude-code-templates · original repository metadata. Documentation review: Not reviewed. Last source check: 2026-11-09T15:01:40.954Z.
Categories are inferred from names, descriptions and paths. They do not establish compatibility.
License and attribution
MIT. Third-party content and copyright remain with their authors. Refer to the original license and terms.
Original license ↗Synchronization, copying and user-reported success do not mark a resource as runtime-tested.
Limitations and notes
- Collecting metadata does not mean this site has installed, adapted, runtime-tested or security-reviewed the resource.