n8n-code-javascript
Helps your agent write JavaScript code in n8n. It uses specific syntax and makes HTTP requests. Useful for customizing workflows with custom logic.
What it does
This guide helps you write JavaScript code within n8n, an automation tool. It's useful for more complicated programming tasks that other n8n tools can't handle.
When to use it
- ✓When you need to perform complex calculations or apply custom business logic.
- ✓When processing API responses with complicated structures.
- ✓To group data from different sources in an advanced way.
Example of what to ask your AI
“How can I use JavaScript in n8n to transform input data?”
Want more? Open the sections below.
How to use
The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.
Skill link
Ready-to-paste message
How it works
n8n allows you to write your own JavaScript code to manipulate data. It provides special tools to access information from previous steps and make requests to other services.
Installation
Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.
In the terminal (Claude Code, Codex, Cursor), in your project folder:
npx skills add sickn33/agentic-awesome-skills --skill n8n-code-javascriptOr download just the file:
curl -L https://raw.githubusercontent.com/sickn33/agentic-awesome-skills/main/plugins/agentic-awesome-skills-claude/skills/n8n-code-javascript/SKILL.md -o SKILL.mdTechnical content (original SKILL.md)
Original text by the author, straight from GitHub.
JavaScript Code Node
Expert guidance for writing JavaScript code in n8n Code nodes.
Detailed Guide
Read the detailed guide before executing this skill. It retains the complete procedure and reference material. Treat its safety, prerequisites, and validation requirements as mandatory. For focused work, load the relevant sections; for end-to-end work, read the guide completely.
When to Use Code Node
Use Code node when:
- ✅ Complex transformations requiring multiple steps
- ✅ Custom calculations or business logic
- ✅ Recursive operations
- ✅ API response parsing with complex structure
- ✅ Multi-step conditionals
- ✅ Data aggregation across items
Consider other nodes when:
- ❌ Simple field mapping → Use Set node
- ❌ Basic filtering → Use Filter node
- ❌ Simple conditionals → Use IF or Switch node
- ❌ HTTP requests only → Use HTTP Request node
Code node excels at: Complex logic that would require chaining many simple nodes
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
FAQ
When should I use the Code node instead of other nodes?
Use the Code node for complex multi-step transformations, custom calculations, recursive logic, parsing complex API responses, multi-step conditionals, or data aggregation. For simpler tasks like field mapping or basic filtering, use nodes like 'Set', 'Filter', or 'IF'.
What are '$input', '$json', '$node', and '$helpers'?
These are special shortcuts n8n provides so your JavaScript code can easily access input data, information from previous nodes, and useful functions for making requests or working with dates.
Does this guide replace the need to test my code?
No. This guide offers guidance, but you still need to validate and test your code in your specific environment to ensure it works correctly and securely.
Details
Original description by the author
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.
Popularity
- GitHub stars
- 48k
- Ranking position
- #3654
- License
- MIT
- Updated
- 10/15/2026
Comments
- …
More skills from this repository
00-andruia-consultant
Helps your agent start or improve AI projects. It analyzes code, suggests tools, and creates action plans in Spanish.
sickn33/agentic-awesome-skills
007
Lets your agent perform security audits and threat modeling. It's useful for protecting projects against attacks and vulnerabilities.
sickn33/agentic-awesome-skills
10-andruia-skill-smith
Helps your agent create or improve AI tools. It defines how tools work, writes documentation, and validates the structure.
sickn33/agentic-awesome-skills
20-andruia-niche-intelligence
Lets your agent create a summary about a specific industry. It's useful for understanding the context, rules, usage patterns, and risks of a project, using reliable sources.
sickn33/agentic-awesome-skills
Similar skills
benchmark-optimization-loop
Has your agent improve something's speed in a measured way. It tests multiple versions and chooses the fastest one that still works correctly.
affaan-m/ECC
change-impact
Helps your agent analyze the impact of code changes before making them. It compares the planned vs. actual results afterward, covering paths, data, tests, and documentation. Useful for risky or system-wide changes.
affaan-m/ECC
click-path-audit
Lets your agent trace all user buttons and interactions to find bugs. It finds issues where functions seem to work alone but fail together. Useful when bugs persist even after debugging.
affaan-m/ECC