n8n-code-python
CommunityRun Python code in n8n Code nodes with stdlib.
Authoralexadark
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Python usage inside n8n Code nodes is limited by the lack of external libraries and the need to keep workflows robust. This Skill clarifies when Python is appropriate, how to access data from inputs and webhook bodies, and how to reason about Python's standard library within n8n, helping you automate data processing without breaking your automation.
Core Features & Use Cases
- _input/_json/_node data access: Learn how to read and transform data from multiple sources in Python Code nodes.
- Webhook gotcha: Webhook data is under
_json["body"], not at the root of_json. - Error prevention: Understand and prevent the top 5 Python Code node errors (ModuleNotFoundError, Empty code / Missing return, KeyError, IndexError, Incorrect return format).
- Standard library only: Use json, datetime, re, base64, hashlib, urllib.parse, math, random, statistics.
- Guided patterns: Use _input.all() for batch processing, _input.first() for single item flows, and per-item mode when appropriate.
Quick Start
Start with a minimal Python Code node that reads all input items with _input.all(), performs a simple transformation, and returns the results in the required format. For example, add a timestamp and pass through fields.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: n8n-code-python Download link: https://github.com/alexadark/shorts-generator/archive/main.zip#n8n-code-python Please download this .zip file, extract it, and install it in the .claude/skills/ directory.