n8n-syntax-code-node
Installation
SKILL.md
n8n Code Node
Complete reference for the n8n v1.x Code node — JavaScript and Python modes, execution models, available variables, binary data, restrictions, and return format.
Quick Reference
| Aspect | Detail |
|---|---|
| Languages | JavaScript (Node.js) — always available; Python — requires N8N_PYTHON_ENABLED=true (stable v1.111.0+) |
| Default mode | Run Once for All Items |
| Return format | MUST return [{json: {...}}] (all-items) or {json: {...}} (each-item) |
| Environment | Sandboxed — no filesystem, no HTTP, no $itemIndex, no $secrets, no $parameter |
CRITICAL: 5 Restrictions
These restrictions apply to ALL Code node executions. Violating them causes runtime errors.
- NO filesystem access — NEVER use
fs,path, or any file I/O. Use Read/Write Files From Disk nodes instead. - NO HTTP requests — NEVER use
fetch,axios, orhttp. Use the HTTP Request node instead.
Related skills