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-code

Installs 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
1sickn33 avatarantigravity-skill-orchestratorsickn33/antigravity-awesome-skillsantigravity skill orchestrator205skills.sh installs
2erichowens avatargeospatial-data-pipelineerichowens/some_claude_skillsgeospatial data pipeline197skills.sh installs
3sickn33 avatarsaga-orchestrationsickn33/antigravity-awesome-skillssaga orchestration190skills.sh installs
4curiouslearner avatarreport-generatorcuriouslearner/devkitGenerate professional markdown and HTML reports from data with charts, tables, and analysis.180skills.sh installs
5jamesrochabrun avatardesign-brief-generatorjamesrochabrun/skillsGenerate comprehensive design briefs for design projects. Use this skill when designers ask to "create a design brief", "structure a design project", "define de178skills.sh installs
6jeremylongshore avatarmermaid-flowchart-generatorjeremylongshore/claude-code-plugins-plus-skillsGenerate mermaid flowchart generator operations. Auto-activating skill for Visual Content. Triggers on: mermaid flowchart generator, mermaid flowchart generator174skills.sh installs