Agent skill · software engineering · aiskillstore
n8n-code-python
Write Python code in n8n Code nodes. Use when writing Python in n8n, using _input/_json/_node syntax, working with standard library, or need to understand Python limitations in n8n Code nodes.
Why this skill is useful
Provides specific guidance on using Python in n8n Code nodes, including syntax and limitations not commonly known.
What it needs
About 10k tokens when loaded. Last updated 2026-08-07. 405 stars on the source repository.
What this skill does
Python Code Node (Beta) Expert guidance for writing Python code in n8n Code nodes. --- ⚠️ Important: JavaScript First Recommendation: Use JavaScript for 95% of use cases. Only use Python when: You need specific Python standard library functions You're significantly more comfortable with Python syntax You're doing data transformations better suited to Python Why JavaScript is preferred: Full n8n helper functions ($helpers.httpRequest, etc.) Luxon DateTime library for advanced date/time operations No external library limitations Better n8n documentation and community support --- Quick Start Essential Rules 1. Consider JavaScript first - Use Python only when necessary 2. Access data: input.all(), input.first(), or input.item 3. CRITICAL: Must return [{"json": {...}}] format 4. CRITICAL: Webhook data is under json["body"] (not json directly) 5. CRITICAL LIMITATION: No external libraries (no requests, pandas, numpy) 6. Standard library only: json, datetime, re, base64, hashlib, urllib.parse, math, random, statistics --- Mode Selection Guide Same as JavaScript - choose based on your use case: Run Once for All Items (Recommended - Default) Use this mode for: 95% of use cases How it works: Code executes once regardless of input count Data access: input.all() or items array (Native mode) Best for: Aggregation, filtering, batch processing, transformations Performance: Faster for multiple items (single execution) Run Once for Each Item Use this mode for: Specialized cases only How it works: Code executes separately for each input item Data access: input.item or item (Native mode) Best for: Item-specific logic, independent operations, per-item validation Performance: Slower for large datasets (multiple executions) --- Python Modes: Beta vs Native n8n offers two Python execution modes: Python (Beta) - Recommended Use: input, json, node helper syntax Best for: Most Python use cases Helpers available: now, today, jmespath() Import: from datetime import datetime Python (Native) (Be …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills aiskillstore/n8n-code-python