n8n-code-javascript

Craft and optimize JavaScript Code Node workflows in n8n.

Updated Apr 11, 2026
One-click install
npx skills add https://github.com/gabrielrdga/n8n-skills --skill n8n-code-javascript-gabrielrdga
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: n8n-code-javascript
Source: https://github.com/gabrielrdga/n8n-skills/tree/main/skills/n8n-code-javascript
Command: npx skills add https://github.com/gabrielrdga/n8n-skills --skill n8n-code-javascript-gabrielrdga

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It provides expert guidance for writing JavaScript code in n8n Code nodes, helping users avoid common pitfalls and maximize the use of built-in functions.

Core Features & Use Cases

  • Comprehensive mode guidance for Code nodes (All Items vs. Each Item) and safe data access patterns.
  • In-depth reference to common patterns, error prevention, and built-in helpers (http requests, DateTime/Luxon, JSON querying).
  • Real-world workflows coverage including API integration, webhook handling, and data transformation.

Quick Start

Open a Code node, select Run Once for All Items, and try a simple map-based transformation that returns [{json: ...}] using $input.all().

Frequently Asked Questions about n8n-code-javascript

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

FAQPage Schema
How do I write JavaScript in an n8n Code node to transform data?

To write JavaScript in an n8n Code node, use the Run Once for All Items mode and apply a map-based transformation on $input.all() to return results in the format [{json: ...}].

What is the difference between All Items and Each Item modes in n8n Code nodes?

All Items mode processes the entire dataset at once using $input.all(), while Each Item mode processes items individually. Choosing the right mode depends on your data transformation needs.

Can I make HTTP requests inside an n8n Code node?

Yes, you can make HTTP requests inside an n8n Code node by utilizing built-in $helpers, allowing you to handle API integration and webhook data directly within your JavaScript workflow.

How do I handle dates with Luxon in n8n JavaScript workflows?

Handle dates in n8n JavaScript workflows using the built-in DateTime and Luxon functions. The Code node supports these libraries natively for parsing, formatting, and manipulating date data.

Why does my n8n Code node return a data format error?

An n8n Code node returns a data format error when output is not structured correctly. Prevent errors by ensuring your JavaScript returns a safe array format like [{json: ...}].

What is the best way to access webhook data in an n8n Code node?

The best way to access webhook data in an n8n Code node is through safe data access patterns using $input.all(). This approach ensures reliable JSON querying and prevents workflow errors.