Dev & Engineering n8npythoncode-nodesworkflow-automationstandard-librarydata-transformation

n8n Python Code Node Guide

Write dependable Python for n8n Code nodes within their real runtime limits.

FollowSkills review · FSRS-2.0
Not recommended
49/ 100 5-point scale 2.5 / 5
Trust14 / 25 · 2.8/5

The materials show no malware, credential theft, or destructive defaults, and they recommend standard-library usage and other n8n nodes; however, they do not systematically address least privilege, user confirmation, sensitive-data handling, external-request risks, rollback, or data-flow auditing, so points are deducted. The publisher is unverified and treated as unknown, not as positive evidence.

Reliability7 / 20 · 1.8/5

The documentation covers input modes, return formats, common errors, and empty-input handling, making the happy path reasonably clear. However, key examples conflict on _node access, alternately showing direct access and calling first(), and a quick-start example uses datetime without showing its import. There is no executable test or reproduced failure evidence; under static calibration the score cannot exceed 10, so points are deducted.

Adaptability10 / 15 · 3.3/5

Triggers, intended users, Python-versus-JavaScript boundaries, and external-library limitations are fairly clear. Precision is reduced by limited treatment of n8n version differences, Python Beta runtime variation, input contracts, and non-fit cases, and there is no Chinese-language guidance. Core functionality does not depend on overseas services, but documentation reachability is not addressed, so points are deducted.

Convention8 / 15 · 2.7/5

The skill uses layered SKILL, README, data-access, error-pattern, and standard-library documents with many examples, limitations, and a 1.0.0 version. It lacks a changelog, explicit maintenance owner, update path, and dependency/compatibility governance. Claims such as “production-tested” and “Production Ready” lack supporting evidence in the supplied files, so points are deducted.

Effectiveness6 / 15 · 2.0/5

The material can directly help users write common Python Code node transformations, filtering, aggregation, and error-handling logic, with copyable templates. However, some examples may depend on unverified n8n runtime behavior, contain syntax or semantic inconsistencies, and most tasks are explicitly better served by JavaScript or other nodes. Human verification is therefore still required, so points are deducted.

Verifiability4 / 10 · 2.0/5

The files contain concrete code, error messages, and wrong-versus-right comparisons, providing limited static auditability. They contain no committed tests, CI coverage, execution logs, third-party validation, or independently reproducible results, and the external documentation links do not establish an evidence chain. Points are therefore deducted.

Evidence confidence:Low Reviewed Jul 20, 2026 Reviewed revision 05eea4848c12
Before you use it
  • Before deployment, verify Python Beta and Native modes, _node references, empty inputs, and webhook structure on the target n8n version.
  • Do not copy examples containing passwords, API keys, or user data directly; add redaction, credential-management, and least-privilege guidance.
  • Resolve the conflicting _node syntax and add evidence for version compatibility, maintenance ownership, and change history.
Review evidence [1][2][3][4][5][6]
See the full review method →

What does this skill do, and when should you use it?

This is one standalone skill from the n8n-skills repository, focused on writing Python in n8n Code nodes. It covers Python Beta and Native modes, input access, webhook data nesting, return formats, standard-library limits, and common failure patterns. It explicitly recommends JavaScript for most cases, reserving Python for Python-specific standard-library needs or an explicit user preference. It fits users building n8n transformations, filters, validations, regex processing, or basic statistical operations.

It explains how to read n8n data with _input.all(), _input.first(), _input.item, _json, and _node; distinguishes variables available in Python Beta and Native modes; produces Code node examples using the required [{"json": {...}}] structure; documents webhook payloads under _json["body"]; restricts imports to the standard library and suggests alternatives using json, datetime, re, base64, hashlib, and statistics; and diagnoses external-library imports, missing returns, malformed output, KeyError, and SplitInBatches issues.

  1. An n8n developer needs to transform, filter, aggregate, or sort multiple input items in a Code node.
  2. A workflow author needs Python standard-library features such as re, hashlib, or statistics.
  3. A user is processing webhook requests and needs to read fields nested under body correctly.
  4. A workflow maintainer is debugging ModuleNotFoundError, KeyError, or invalid Code node output.
  5. A user needs to choose between Python Beta and Native modes and understand _input versus _items.

What are this skill's strengths and limitations?

Pros
  • Clearly distinguishes Python Beta and Native modes, including their data-access variables.
  • Covers critical n8n rules for output structure, webhook body nesting, and safe dictionary access.
  • Explains the no-external-library limitation and gives practical HTTP, analytics, and scraping workarounds.
  • Includes patterns for transformation, filtering, aggregation, regex, validation, and statistics.
Limitations
  • Default environments do not support external packages such as requests, pandas, numpy, scipy, BeautifulSoup, or lxml.
  • The skill recommends JavaScript for 95% of use cases, so it is not a general-purpose Python guide.
  • Python execution is labeled Beta, and cross-iteration state accumulation may not be available in Python Beta.
  • The source provides no independent test results and does not document platform coverage beyond the n8n-related environment.

How do you install this skill?

Install the skill with the n8n-skills repository. For manual installation, run: git clone https://github.com/czlonkowski/n8n-skills.git, then cp -r n8n-skills/skills/* ~/.claude/skills/. The repository also supports Claude Code plugin installation with /plugin install czlonkowski/n8n-skills. The source does not provide a separate command for installing only skills/n8n-code-python.

How do you use this skill?

After installation, make the request explicitly about Python in an n8n Code node, for example: “Can I use pandas in Python Code node?” or “Write Python for an n8n Code node to filter the input using the standard library.” For the AI-agent-callable Custom Code Tool, use n8n-code-tool instead; that node has a different _query input and string-return contract.

How does this skill compare with similar options?

Compared with JavaScript Code nodes, this skill is better suited to Python syntax or specific standard-library operations; JavaScript offers fuller n8n helpers, Luxon, and fewer external-library constraints. Compared with HTTP Request, Set, Filter, IF, or Switch nodes, it targets programmable logic rather than simple field mapping, basic filtering, or conditional branching.

FAQ

Does this skill cost anything?
The source identifies the repository as MIT licensed, but it does not mention a hosted service or additional fees.
Can I install pandas or requests in a Python Code node?
Not in default installations. Availability on a self-hosted instance depends on the Python runner configuration; when uncertain, use the standard library or ask the instance administrator.
Why must the code return a list containing a json key?
Downstream n8n nodes expect the [{"json": {...}}] structure. Returning a dictionary, an unwrapped list, or a string can cause workflow execution to fail.
Does this cover the AI Agent Custom Code Tool?
Not directly. The Custom Code Tool uses _query and must return a string, so the n8n-code-tool skill is the appropriate reference.

More skills from this repository

All from czlonkowski/n8n-skills

Dev & Engineering

n8n JavaScript Code Node Guide

Write reliable, efficient JavaScript for n8n Code nodes.

Dev & Engineering

n8n AI Code Tool Guide

Write JavaScript or Python that obeys the n8n Custom Code Tool contract for AI-agent calls.

Automation & Ops

n8n Binary & File Handling

Keep files intact in n8n workflows and move them safely through AI tools and chat interfaces.

Dev & Engineering

n8n Expression Syntax Guide

Write, validate, and repair n8n expressions for reliable workflow data mapping.

Automation & Ops

n8n Error Handling

Make n8n workflow failures routable, visible, and recoverable.

Automation & Ops

n8n Multi-Instance Targeting

Safely select, verify, and switch the n8n instance targeted by an MCP session.

Automation & Ops

n8n AI Agent Architecture Guide

Design n8n AI agents with the right nodes, tool connections, memory, structured output, and human approval.

Automation & Ops

n8n MCP Workflow Router

Routes n8n-mcp tasks to the right skills and reduces production workflow failures.

Automation & Ops

n8n Subworkflow Architect

Turn reusable n8n logic into explicit, testable sub-workflows that humans and AI agents can discover and call safely.

Automation & Ops

n8n Node Configuration Guide

Configure n8n nodes by operation and dependency to reduce validation errors and silent runtime failures.

Automation & Ops

n8n Validation Expert

Explains n8n validation results and guides iterative fixes for problems that can stop workflows from running.

Automation & Ops

n8n MCP Tools Expert

A practical guide for reliably searching, validating, and managing n8n workflows.

Automation & Ops

n8n Workflow Architecture Patterns

Design, validate, and deploy reliable n8n workflows with proven architectural patterns.

Automation & Ops

n8n Self-Hosting Deployment

Deploy production self-hosted n8n on Linux with Docker Compose, Caddy, and automatic HTTPS.

Related skills