n8n-code-javascript

Guide JavaScript development in n8n Code nodes with data access and return formats.

Updated Mar 21, 2026
One-click install
npx skills add https://github.com/TuBl/n8n --skill n8n-code-javascript-tubl
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: n8n-code-javascript
Source: https://github.com/TuBl/n8n/tree/main/.codex/skills/n8n-mcp-skills-v1.1.0/n8n-code-javascript
Command: npx skills add https://github.com/TuBl/n8n --skill n8n-code-javascript-tubl

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Writing JavaScript in n8n Code nodes can be opaque and error-prone; this skill provides clear guidance on data access patterns, safe webhook handling, API integration, and mode selection to help you build reliable workflows.

Core Features & Use Cases

  • Comprehensive guidance on Code node data access, return formats, error prevention, and debugging.
  • Built-in references for DateTime (Luxon), $helpers, and JSON querying with $jmespath, plus persistent storage with $getWorkflowStaticData.
  • Production-ready patterns for data transformation, multi-source aggregation, and API interactions across real-world scenarios.
  • Real-world guidance for Batch processing (All Items), Per-item processing (Each Item), and robust error handling.

Quick Start

Select Run Once for All Items, process the input with $input.all(), then return a proper [{json: {...}}] array.

Frequently Asked Questions about n8n-code-javascript

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I return data from an n8n Code node without getting an error?▼

To return data from an n8n Code node without errors, you must format your output as an array of objects using the exact structure `[{json: {...}}]` to ensure the workflow properly parses the payload.

What is the difference between Run Once for All Items and Run Each Item in n8n?▼

Run Once for All Items processes the entire input array simultaneously using `$input.all()`, while Run Each Item iterates individually over items using `$input.item` for per-item data transformation.

How do I make HTTP requests inside an n8n Code node?▼

You can make HTTP requests inside an n8n Code node by utilizing the `$helpers.httpRequest` method, which provides a safe way to integrate external APIs and fetch data during workflow execution.

Can I use Luxon DateTime and JMESPath in n8n JavaScript workflows?▼

Yes, n8n JavaScript workflows support Luxon DateTime for date manipulation and `$jmespath` for JSON querying, alongside `$getWorkflowStaticData` for persistent storage across workflow runs.

What is the best way to handle webhooks safely in n8n Code nodes?▼

The best way to handle webhooks safely in n8n Code nodes involves following production-ready patterns for data validation and error prevention to build reliable, secure automated workflows.

Why does my n8n Code node fail when processing multiple items?▼

An n8n Code node fails when processing multiple items if the return format is incorrect or the wrong execution mode is selected, requiring proper use of `$input.all()` with the `[{json: {...}}]` array.