SKILL

n8n-code-python

在 n8n Code 节点中编写 Python 代码。适用于在 n8n 中编写 Python、使用 _input/_json/_node 语法、使用标准库,或需要了解 n8n Code 节点中 Python 限制的情况。

机器翻译
查看英文原文

Write Python code in n8n Code nodes. Use when writing Python in n8n, using _input/_json/_node syntax, working with standard library, or need to understand Python limitations in n8n Code nodes.

适用对象:AI 与流程自动化。自动收录 · 待核查。

原作者说明节选

从固定版本的 SKILL.md 提取,保留原文语言。以下内容属于作者说明,本站尚未验证安装、兼容或运行结果。

查看英文原文

原文涵盖的主题

  • Python Code Node (Beta)
  • ⚠️ Important: JavaScript First
  • Quick Start
  • Essential Rules
  • Mode Selection Guide
  • Run Once for All Items (Recommended - Default)
  • Run Once for Each Item
  • Python Modes: Beta vs Native

Expert guidance for writing Python code in n8n Code nodes. -- Recommendation: Use JavaScript for 95% of use cases. Only use Python when: You need specific Python standard library functions You're significantly more comfortable with Python syntax You're doing data transformations better suited to Python Why JavaScript is preferred: Full n8n helper functions ($helpers.httpRequest, etc.) Luxon DateTime library for advanced date/time operations No external library limitations Better n8n documentation and community support -- 1. Consider JavaScript first - Use Python only when necessary 2. Access data: input.all(), input.first(), or input.item 3. CRITICAL: Must return [{"json": {...}}] format 4. CRITICAL: Webhook data is under json["body"] (not json directly) 5. CRITICAL LIMITATION: No external libraries (no requests, pandas, numpy) 6. Standard library only: json, datetime, re, base64, hashlib, urllib.parse, math, random, statistics -- Same as JavaScript - choose based on your use case: Use this mode for: 95% of use cases How it works: Code executes once regardless of input count Data access: input.all() or items array (Native mode) Best for: Aggregation, filtering, batch processing, tr

这里只展示节选,请以完整原文和当前要求为准。

来源仓库
davila7/claude-code-templates
源文件
cli-tool/components/skills/workflow-automation/n8n/n8n-code-python/SKILL.md
固定版本
21be197f100a12b8d0dd9a211cc244c8179f84d3
阅读完整原作者说明 ↗

来源与内容状态

本条为自动发现的元数据,尚未完成人工文档核查;适用性与运行结果待核查。

原作者:davila7/claude-code-templates · 原作者仓库元数据。文档核查:未核查。最近来源检查:2026-11-09T15:01:40.954Z。

分类由名称、说明与路径规则生成,分类不代表已核实适配。

许可与权利归属

MIT。第三方内容及版权归原作者,使用条件以原文为准。

许可原文 ↗

本站没有因同步、复制或用户自报成功而将资源标为运行验证通过。

限制与注意事项

  • 元数据收录不代表本站已经安装、适配、实测或进行安全审查。