N8n Code Python

by czlonkowski19cd793f4789No license6.3K starsListed Oct 8, 2026Updated Oct 8, 2026Repository updated 3 weeks ago

Write Python in n8n Code nodes (native Python, `language` pythonNative, n8n 2.x). Use when the user explicitly wants Python in a Code node, when migrating old Pyodide/"Python (Beta)" code that used _input/_json/_node/_now, or when a Python Code node fails with NameError, "Security violations detected", "Import of standard library module … is disallowed", "__build_class__ not found", "A 'json' property isn't a dictionary", or "Python runner unavailable". Covers the only two variables (_items/_item), dict-only access, imports blocked by default, the sandbox's denied builtins, accepted return shapes, and how errors interact with onError. JavaScript is the default for Code nodes — native Python has no n8n helpers and, by default, no imports. EXCEPTION — for Python in the AI-agent-callable Custom Code Tool (@n8n/n8n-nodes-langchain.toolCode), use the n8n-code-tool skill instead (input is _query, return must be a string).

  1. 19cd793f4789Currentcommit 19cd793Published Oct 8, 2026

Source and attribution

Source:czlonkowski/n8n-skillsinskills/n8n-code-pythonat commit19cd793

License: No license

Content belongs to its original authors. SourceWeft indexes it from a public repository.

Report or request removal

More from czlonkowski/n8n-skills

Using N8n Mcp Skills

czlonkowski

Routes n8n workflow tasks to specialist skills and documents the n8n-mcp tool surface.

AI & Agents6.3Kupdated 3 weeks ago

N8n Validation Expert

czlonkowski

Guides interpretation and fixing of n8n workflow validation errors, warnings and false positives.

Software Development6.3Kupdated 3 weeks ago

N8n Subworkflows

czlonkowski

Guides building reusable, composable n8n sub-workflows with typed inputs, clear contracts and correct call modes.

AI & Agents6.3Kupdated 3 weeks ago

N8n Multi Instance

czlonkowski

Use when an n8n-mcp account targets more than one n8n instance — i.e. the `n8n_instances` tool is available, the user mentions multiple n8n instances or environments (prod vs staging, several teams or clients), a workflow / datatable / credential / execution call returns an unexpected NOT_FOUND or reads data you don't recognize, or a credential create/update/delete is refused with an `INSTANCE_AMBIGUOUS` error. Covers choosing and switching which instance this MCP session targets, verifying the target before high-stakes work — credential writes above all — and recovering from misroutes and ambiguous-write fail-closes. Always consult this skill before operating on a specific instance, before any credential create/update/delete on a multi-instance account, or when a call hits the wrong/empty data or an `INSTANCE_AMBIGUOUS` error.

Awaiting classification6.3Kupdated 3 weeks ago

N8n Mcp Tools Expert

czlonkowski

Guides an agent in correctly using n8n-mcp MCP tools to search nodes, validate configs, and manage n8n workflows.

AI & Agents6.3Kupdated 3 weeks ago

N8n Expression Syntax

czlonkowski

Guides writing and debugging n8n expressions, including {{}} syntax, $json/$node variables, and $jmespath queries.

Software Development6.3Kupdated 3 weeks ago