
N8n Code Python
This helps you write Python in n8n Code nodes, but here's the catch: you should probably use JavaScript instead for 95% of cases. Python in n8n is severely limited. No external libraries at all, so no requests, pandas, or numpy. Just standard library stuff like json, datetime, and re. The main gotcha is webhook data lives under body, not at the root, which trips people up constantly. Return format must be a list of dictionaries with a json key or your workflow breaks. Use Python only when you genuinely need specific standard library functions or you're way more comfortable with Python syntax. Otherwise, stick with JavaScript for full n8n helper functions and better documentation.
- skills.sh installs
- 215
- GitHub stars
- 39.4K
- last updated
- Jun 3, 2026
Install
$ npx -y skills add sickn33/antigravity-awesome-skills --skill n8n-code-python --agent claude-codeInstalls into .claude/skills of the current project.
Files
Python Code Node (Native)
When to Use
Use for bounded Python transformations in an n8n Code node when native nodes or expressions are insufficient. Check the installed n8n version and task runner first.
Runtime contract
n8n 2 removed the legacy Pyodide runtime. Native Python uses _items in all-items
mode and _item in per-item mode; legacy _input, _json, _node and _now
helpers are unavailable. Self-hosted imports depend on installed runner packages
and explicit allowlists. Cloud imports may be unavailable, including standard
modules. JavaScript imports are restricted too; switching languages does not
provide unrestricted filesystem, networking or package access.
Examples
All-items mode, with no imports:
return [
{"json": {"id": item["json"].get("id"), "processed": True},
"pairedItem": {"item": index}}
for index, item in enumerate(_items)
if item["json"].get("active")
]
Per-item mode:
return {"json": {**_item["json"], "name_upper": (_item["json"].get("name") or "").upper()}}
Sponsors
Details
- Repository
- github.com/sickn33/antigravity-awesome-skills
- Categories
- Automation & Workflows, Python
- First seen
- Jun 3, 2026
More from sickn33/antigravity-awesome-skills
All 708- Security Bluebook Builder215
- Haskell Pro213
- Threat Mitigation Mapping212
- Cc Skill Clickhouse Io211
- Embedding Strategies210
- Xlsx208
- Cqrs Implementation207
- Bats Testing Patterns206
- Antigravity Skill Orchestrator205
- Conductor Validator205
- Julia Pro205
- X Article Publisher Skill205
- Ml Pipeline Workflow204
- Distributed Tracing203
- Fix Review203
- Pci Compliance203
- Team Collaboration Issue203
- Fal Generate201
- Graphql Architect201
- Incident Response Incident Response201
- Network 101201
- Workflow Patterns201
- Multi Cloud Architecture200
- Stride Analysis Patterns199