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.
npx skills add sickn33/agentic-awesome-skills --skill n8n-code-python --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# 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 ```python # Basic template for Python Code nodes items = _input.all() # Process data processed = [] for item in items: processed.append({ "json": { **item["json"], "processed": True, "timestamp": datetime.now().isoformat() } }) return processed ``` ### 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**: **
- ⚠️ Important: JavaScript First
- Quick Start
- Essential Rules
- Mode Selection Guide
- Run Once for All Items (Recommended - Default)
- Run Once for Each Item
- Python Modes: Beta vs Native
- Python (Beta) - Recommended
- Python (Native) (Beta)
- Data Access Patterns
- Pattern 1: input.all() - Most Common
- Pattern 2: input.first() - Very Common
- Pattern 3: input.item - Each Item Mode Only
- Pattern 4: node - Reference Other Nodes
What does the n8n-code-python skill do?
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.
How do I install it?
Run `npx skills add sickn33/agentic-awesome-skills --skill n8n-code-python --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From sickn33/agentic-awesome-skills, a repository with 44,414 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.