n8n-code-nodes

Write JavaScript and Python code within n8n Code nodes.

1|Updated Mar 7, 2026
One-click install
npx skills add https://github.com/gerardloupecyb/skills --skill n8n-code-nodes
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: n8n-code-nodes
Source: https://github.com/gerardloupecyb/skills/tree/main/n8n-code-nodes
Command: npx skills add https://github.com/gerardloupecyb/skills --skill n8n-code-nodes

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill empowers users to write, debug, and optimize JavaScript or Python code directly within n8n Code nodes, enabling complex data transformations and custom logic that goes beyond standard node capabilities.

Core Features & Use Cases

  • Code Writing & Debugging: Develop and troubleshoot JavaScript or Python code for Code nodes.
  • Data Transformation: Perform intricate data manipulations, aggregations, and custom business logic.
  • API Integration: Make custom API calls using $helpers.httpRequest() or Python's urllib.
  • Date & Time Operations: Utilize Luxon (JS) or datetime (Python) for advanced date handling.
  • Use Case: Automatically parse complex JSON responses from an API, transform the data into a specific format, and then enrich it with calculated fields before passing it to the next node in your n8n workflow.

Quick Start

Use the n8n-code-nodes skill to write JavaScript code that transforms an array of items, adding a 'processed' field to each.

Frequently Asked Questions about n8n-code-nodes

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 an array of items?

To write JavaScript in an n8n Code node, use data access patterns like $input.all() to retrieve items and ensure your return format matches the expected structure for successful data transformation.

How does $input.all() work in n8n workflow automation?

The $input.all() method in n8n retrieves all incoming items from the previous node, allowing you to iterate over the entire dataset for complex data transformation and aggregation within Code nodes.

Can I use Python for data transformation in n8n Code nodes?

Yes, you can use Python in n8n Code nodes for data transformation, utilizing language-specific nuances like the datetime module for date handling and urllib for custom API calls.

What is the correct return format for n8n Code nodes?

The correct return format for n8n Code nodes requires structuring your output as an array of JSON objects, ensuring downstream nodes can properly access the transformed data and calculated fields.

Why does my n8n Code node fail when accessing webhook data?

n8n Code node failures with webhook data often occur due to incorrect return formats or improper data access patterns; ensure you follow specific webhook data handling rules to prevent errors.

Does n8n support custom API calls within workflow automation Code nodes?

Yes, n8n supports custom API calls within Code nodes by using $helpers.httpRequest() in JavaScript or urllib in Python, enabling you to fetch, parse, and enrich external JSON responses.