using-n8n-skills-official

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Using n8n Skills

使用n8n Skills

The official n8n MCP evolves over time, so tool names, parameters, and default behaviors can drift between versions. When you spot drift (a tool a skill names doesn't exist, a parameter shape doesn't match what
get_node_types
returns, or behavior differs from what the skill describes), suggest updating the skill and n8n instance to the latest stable.
官方n8n MCP会不断演进,因此不同版本间的工具名称、参数和默认行为可能会存在差异。当你发现差异(Skill提及的工具不存在、参数结构与
get_node_types
返回的不符,或行为与Skill描述不一致)时,建议将Skill和n8n实例更新至最新稳定版本。

Non-negotiables

不可违背的规则

Three rules with no exceptions. Violating any produces workflows that look right but break in production.
  1. Invoke the relevant skill before any n8n action. Not just MCP tool calls. Before writing SDK code, configuring a node, designing a workflow, wiring a connection, building an agent, or handling errors: invoke the matching skill via the Skill tool. This document is a router. The skill body has the actual rules. The PreToolUse hooks remind you on the highest-impact MCP calls if a plugin is installed. The responsibility is yours on everything else. Err on the side of reading extra documents.
  2. Validate AND verify before publishing.
    validate_workflow
    before
    publish_workflow
    , and
    get_workflow_details
    after every create or update to check the
    connections
    object. Validation alone misses many issues documented in the skills that will silently break workflows.
  3. Tokens/secrets never go in text fields. Always use the n8n credential system. If no native node exists, configure HTTP Request with the official credential type. See
    n8n-credentials-and-security-official
    .
三条无例外的规则。违反任何一条都会导致工作流看似正常,但在生产环境中失效。
  1. 执行任何n8n操作前先调用对应的Skill。不仅限于MCP工具调用。在编写SDK代码、配置节点、设计工作流、连接节点、构建Agent或处理错误之前:通过Skill工具调用匹配的Skill。本文档仅作为路由指引,具体规则在Skill主体内容中。若已安装插件,PreToolUse钩子会在高影响MCP调用时提醒你。其他所有操作则由你自行负责,宁可多阅读相关文档也不要遗漏。
  2. 发布前必须验证并确认。发布前先执行
    validate_workflow
    ,每次创建或更新后执行
    get_workflow_details
    检查
    connections
    对象。仅靠验证无法发现Skill文档中记录的许多会导致工作流静默失效的问题。
  3. 令牌/机密信息绝不能放入文本字段。务必使用n8n凭证系统。若没有原生节点,可配置HTTP Request并使用官方凭证类型。详见
    n8n-credentials-and-security-official

Lean on skills, not training data

依赖Skill,而非训练数据

n8n evolves faster than any model's training cutoff. Parameter names drift, new MCP tools land, defaults change, patterns get deprecated. Anything you "remember" is likely wrong, often silently.
Trust the skills + live MCP tools (
get_node_types
,
get_sdk_reference
,
get_workflow_best_practices
) over recollection. If a skill contradicts what you "know", trust the skill. If
get_node_types
contradicts a skill, trust the tool. Without this discipline you will ship workflows that look right and silently fail: parameter names that don't exist, renamed nodes, deprecated patterns.
Unless a user preference overrides it, err on the side of loading too many skills rather than too few. Even a 3-node webhook flow typically needs
n8n-node-configuration-official
,
n8n-expressions-official
,
n8n-error-handling-official
, and
n8n-workflow-lifecycle-official
. Nothing in n8n is too small for skills.
n8n的演进速度远超任何模型的训练截止时间。参数名称会变化,新的MCP工具会上线,默认值会修改,旧模式会被弃用。你“记得”的内容很可能已经过时,且往往是静默失效。
优先信任Skill和实时MCP工具(
get_node_types
get_sdk_reference
get_workflow_best_practices
),而非记忆。若Skill与你“所知”内容冲突,信任Skill;若
get_node_types
与Skill冲突,信任工具。若不遵守这一原则,你交付的工作流可能看似正常,但会静默失效:比如使用不存在的参数名称、已重命名的节点、已弃用的模式。
除非用户有特殊偏好,否则宁可加载过多Skill也不要遗漏。即使是包含3个节点的webhook流程,通常也需要
n8n-node-configuration-official
n8n-expressions-official
n8n-error-handling-official
n8n-workflow-lifecycle-official
。n8n中没有任何内容是小到不需要Skill的。

Strong defaults (each skill owns its exceptions)

默认规则(每个Skill可定义例外情况)

  • The Code node is a last resort. Expression first, then arrow function inside Edit Fields, then Code. Code earns its place for multi-source aggregation, libraries, and stateful work. See
    n8n-code-nodes-official
    .
  • Anything reusable becomes a stateless sub-workflow. Search existing ones via
    search_workflows({ tags: ['subworkflow'] })
    before building. See
    n8n-subworkflows-official
    .
  • Code节点是最后选择。优先使用表达式,其次是Edit Fields中的箭头函数,最后才是Code节点。仅在需要多源聚合、调用库或有状态操作时使用Code节点。详见
    n8n-code-nodes-official
  • 任何可复用内容都应做成无状态子工作流。在构建前先通过
    search_workflows({ tags: ['subworkflow'] })
    搜索现有子工作流。详见
    n8n-subworkflows-official

Red flags: thoughts that mean STOP and invoke

警示信号:出现这些想法时请立即停止并调用Skill

These rationalizations cause skills to be skipped. If you catch yourself thinking any of them, invoke the relevant skill via the Skill tool, even if you "already read it" earlier in the session.
ThoughtAction
"This workflow is simple, I'll just build it"Invoke
n8n-workflow-lifecycle-official
. Most "simple" workflows are 10+ nodes by the time they ship.
"I'll add a Set node here to map these fields"Invoke
n8n-expressions-official
. Set nodes feeding only 0 or 1 downstream consumer are the most common antipattern in this entire pack.
"I'll just use a Code node, it's easier"Invoke
n8n-code-nodes-official
. The bar is high. Most reaches for Code can be expressions or Edit Fields with arrow functions.
"Validation passed, I'm ready to publish"Invoke
n8n-workflow-lifecycle-official
and walk
VALIDATION_CHECKLIST.md
section 2 (the antipattern scan). Validation passing is necessary, not sufficient.
"The agent is wired up, the tool descriptions look fine"Invoke
n8n-agents-official
references/TOOLS.md
. Tool names and descriptions ARE part of the prompt, and "looks fine" usually means generic.
"I'll set this sub-workflow trigger to passthrough"Invoke
n8n-subworkflows-official
. Passthrough is only correct for binary-receiving sub-workflows that won't be agent tools, or for sub-workflows that genuinely take no inputs (Define Below requires at least one field).
"I'll use passthrough so binary works, then branch internally on which input shape arrived"Invoke
n8n-subworkflows-official
references/SUBWORKFLOW_PATTERNS.md
"Splitting by input shape". This is the signal to SPLIT into two outer sub-workflows (one Define Below, one passthrough) sharing a common downstream sub-workflow. Don't fight passthrough vs Define Below in one trigger.
"This section's big, I'll pull it into a sub-workflow"If it's only to tidy the canvas (not reuse/isolation/testing), a node group is lighter, faster, and simpler: keep it inline and group it via
setNodeGroups
. Extract to a sub-workflow only for reuse, isolation, or an agent tool. See
n8n-workflow-lifecycle-official
Readability.
"I should ask the user what their credential is named"Don't. The string in
newCredential('Label')
is cosmetic. See
n8n-credentials-and-security-official
.
"The user mentioned data analysis, I'll write Python"Invoke
n8n-code-nodes-official
. Default is JavaScript. Python only when explicitly asked.
"I'll add a Loop Over Items here to process each row"Invoke
n8n-loops-official
. Default per-item iteration probably handles it without a Loop Over Items node.
"Date math, I'll use a DateTime node"Invoke
n8n-expressions-official
. DateTime nodes are almost always wrong.
"I'll wrap this in a Merge with 3 sources"Invoke
n8n-node-configuration-official
references/MERGE_NODE.md
. Merge defaults to 2 inputs, and 3+ sources need
numberOfInputs
set explicitly.
"I'll fan out these three slow steps to run in parallel"Invoke
n8n-workflow-lifecycle-official
and read the Execution model section. n8n executes fan-out branches sequentially (top-to-bottom by Y-position), not concurrently. For real concurrency, see
n8n-loops-official
and
n8n-subworkflows-official
(
mode: 'each'
+
waitForSubWorkflow: false
).
"User said which project, I'll just build it"Invoke
n8n-workflow-lifecycle-official
. Project is not folder. Ask about folder placement BEFORE building. The MCP can't create folders, so if the requested folder doesn't exist, the user must create it in the UI first.
"I'll just run
test_workflow
to see what happens"
Invoke
n8n-workflow-lifecycle-official
references/TESTING.md
.
test_workflow
mocks the trigger only. Slack sends, DB writes, payments all fire for real. Ask the user first when downstreams have side effects.
The meta-skill (this document) tells you WHICH skill applies. The Skill tool loads the actual rules. Reading the meta-skill once at session start is not a substitute for invoking the skill at the moment of decision.
这些合理化借口会导致你跳过Skill。若你发现自己有以下任何想法,请通过Skill工具调用对应的Skill,即使你“之前已经读过”
想法操作
「这个工作流很简单,我直接搭建就行」调用
n8n-workflow-lifecycle-official
。大多数「简单」工作流最终交付时都会包含10个以上的节点。
「我在这里加个Set节点来映射这些字段」调用
n8n-expressions-official
。Set节点仅为0或1个下游节点提供数据是整个工具包中最常见的反模式。
「我直接用Code节点,这样更简单」调用
n8n-code-nodes-official
。使用Code节点的门槛很高,大多数想用Code节点的场景都可以用表达式或Edit Fields中的箭头函数替代。
「验证通过了,我可以发布了」调用
n8n-workflow-lifecycle-official
并查看
VALIDATION_CHECKLIST.md
的第2部分(反模式扫描)。验证通过是必要条件,但并非充分条件。
「Agent已经连接好了,工具描述看起来没问题」调用
n8n-agents-official
references/TOOLS.md
。工具名称和描述是提示词的一部分,“看起来没问题”通常意味着描述过于通用。
「我把子工作流的触发器设置为passthrough」调用
n8n-subworkflows-official
。passthrough仅适用于接收二进制数据且不会作为Agent工具的子工作流,或确实不需要任何输入的子工作流(Define Below要求至少有一个字段)。
「我用passthrough来处理二进制数据,然后在内部根据输入结构分支」调用
n8n-subworkflows-official
references/SUBWORKFLOW_PATTERNS.md
中的「按输入结构拆分」部分。这种情况应该拆分为两个外部子工作流(一个用Define Below,一个用passthrough),共享一个下游子工作流。不要在同一个触发器中混用passthrough和Define Below。
「这部分内容太多了,我把它提取成子工作流」如果只是为了整理画布(而非复用/隔离/测试),节点组更轻量、快速且简单:保持内容内联并通过
setNodeGroups
分组。仅在需要复用、隔离或作为Agent工具时才提取为子工作流。详见
n8n-workflow-lifecycle-official
的可读性部分。
「我应该问问用户他们的凭证名称是什么」不要问。
newCredential('Label')
中的字符串只是显示用的。详见
n8n-credentials-and-security-official
「用户提到了数据分析,我写Python代码」调用
n8n-code-nodes-official
。默认使用JavaScript。仅在用户明确要求时才使用Python。
「我在这里加个Loop Over Items节点来处理每一行数据」调用
n8n-loops-official
。默认的逐项迭代可能无需Loop Over Items节点就能处理。
「处理日期计算,我用DateTime节点」调用
n8n-expressions-official
。DateTime节点几乎总是错误选择。
「我用Merge节点合并3个数据源」调用
n8n-node-configuration-official
references/MERGE_NODE.md
。Merge节点默认只有2个输入,3个及以上数据源需要显式设置
numberOfInputs
「我把这三个慢步骤并行执行」调用
n8n-workflow-lifecycle-official
并查看执行模型部分。n8n会按Y轴从上到下顺序执行分支,而非并行。如需真正的并发,请查看
n8n-loops-official
n8n-subworkflows-official
mode: 'each'
+
waitForSubWorkflow: false
)。
「用户说了项目名称,我直接搭建」调用
n8n-workflow-lifecycle-official
。项目不等于文件夹。搭建前先询问文件夹位置。MCP无法创建文件夹,因此若请求的文件夹不存在,用户必须先在UI中创建。
「我直接运行
test_workflow
看看结果」
调用
n8n-workflow-lifecycle-official
references/TESTING.md
test_workflow
仅模拟触发器。Slack消息发送、数据库写入、支付等操作都会真实执行。当下游操作有副作用时,请先询问用户。
本元Skill(本文档)告诉你应使用哪个Skill。Skill工具会加载具体规则。会话开始时阅读一次元Skill不能替代决策时刻调用Skill。

Skill index

Skill索引

Invoke via the Skill tool. Trigger column = when to invoke.
SkillTrigger
n8n-workflow-lifecycle-official
Starting, designing, organizing, or finishing a workflow. Covers sticky-note conventions, descriptions that capture the why, naming, validation checklist, folder limitations, MCP-access-per-workflow gotcha
n8n-subworkflows-official
Anything reusable, multi-step builds, or the user mentions reuse. Search before building, stateless patterns, tag-based discovery convention
n8n-extending-mcp-official
You need capabilities the MCP doesn't natively provide. Wrap n8n APIs as workflow tools, with user permission
n8n-expressions-official
Writing
{{}}
,
$json
,
$node
, expression errors. Luxon for dates, indented multi-line, prefer expressions over extra nodes
n8n-node-configuration-official
Configuring any node. Operation-aware, property dependencies, never assume parameters
n8n-code-nodes-official
User reaches for a Code node, or custom logic is needed. Decision tree, JavaScript patterns when truly required
n8n-loops-official
Multi-item data, batching, paginated APIs, "for each" or "loop over" mentions. Default per-item iteration,
executeOnce
, Loop Over Items, HTTP pagination
n8n-agents-official
LangChain Agent node, tool calling, system prompts, structured output, memory, RAG. Tool names/descriptions as part of the prompt, sub-workflow as tool, modular prompt design
n8n-error-handling-official
Webhook-triggered or production-bound workflows. Error branch on every fallible node, 4xx for caller errors and 5xx for execution errors
n8n-credentials-and-security-official
Any auth, API key, or token mention. Credential system, custom credentials, HTTP Request with official creds
n8n-binary-and-data-official
Files, images, attachments. Binary handling patterns, agent-tool boundary, CDN requirement for chat surfaces
n8n-data-tables-official
Data Tables: schemas, default columns (id/createdAt/updatedAt), no-FK relational design, dedup, the no-JSON-only-primitives rule, the SDK-vs-UI manual-mapping quirk
n8n-debugging-official
Errors, unexpected behavior, "this isn't working". Believe the user, check parameters, fetch n8n source from GitHub
通过Skill工具调用。触发列=调用时机。
Skill触发时机
n8n-workflow-lifecycle-official
开始、设计、整理或完成工作流时。涵盖便签约定、捕获“原因”的描述、命名规则、验证清单、文件夹限制、每个工作流的MCP访问注意事项
n8n-subworkflows-official
涉及任何可复用内容、多步骤构建或用户提及复用时。构建前先搜索、无状态模式、基于标签的发现约定
n8n-extending-mcp-official
需要MCP原生不具备的功能时。在获得用户许可后,将n8n API封装为工作流工具
n8n-expressions-official
编写
{{}}
$json
$node
或遇到表达式错误时。使用Luxon处理日期、缩进多行、优先使用表达式而非额外节点
n8n-node-configuration-official
配置任何节点时。关注操作、属性依赖、绝不假设参数
n8n-code-nodes-official
用户想要使用Code节点或需要自定义逻辑时。决策树、真正需要时的JavaScript模式
n8n-loops-official
涉及多项目数据、批量处理、分页API或提及“for each”/“loop over”时。默认逐项迭代、
executeOnce
、Loop Over Items、HTTP分页
n8n-agents-official
使用LangChain Agent节点、工具调用、系统提示词、结构化输出、记忆、RAG时。工具名称/描述作为提示词的一部分、子工作流作为工具、模块化提示词设计
n8n-error-handling-official
处理webhook触发或生产环境工作流时。每个可能出错的节点都要设置错误分支,4xx表示调用方错误,5xx表示执行错误
n8n-credentials-and-security-official
涉及任何认证、API密钥或令牌时。凭证系统、自定义凭证、使用官方凭证的HTTP Request
n8n-binary-and-data-official
处理文件、图片、附件时。二进制数据处理模式、Agent工具边界、聊天界面的CDN要求
n8n-data-tables-official
使用Data Tables时:模式、默认列(id/createdAt/updatedAt)、无外键的关系设计、去重、仅使用原始类型而非JSON的规则、SDK与UI手动映射的特殊情况
n8n-debugging-official
遇到错误、意外行为或“无法正常工作”时。相信用户反馈、检查参数、从GitHub获取n8n源码

n8n MCP tools (compact reference)

n8n MCP工具(精简参考)

The MCP defers tool descriptions to save tokens. Below is the short-form list so you have working knowledge of every tool from turn one.
Tool names are shown without the MCP prefix. The qualified name is
mcp__<server>__<tool>
where
<server>
depends on the user's MCP config.
MCP延迟加载工具描述以节省令牌。以下是简短列表,让你从一开始就能了解所有工具的功能。
工具名称省略了MCP前缀。完整名称为
mcp__<server>__<tool>
,其中
<server>
取决于用户的MCP配置。

Workflow management

工作流管理

ToolWhat it does
search_workflows
Search workflows across the instance by
query
(substring on name/description) and/or
tags
(exact tag names, AND semantics: must have all). The primary cross-workflow discovery tool. Use it to discover what already exists.
get_workflow_details
Fetch a workflow's full JSON by ID. Use after every create/update to verify connections.
search_folders
List folders. You cannot create or move folders. You can only place workflows into folders that already exist.
search_projects
List projects.
list_tags
List all workflow tags (with
usageCount
per tag). Check the instance's tag vocabulary before tagging or filtering, so you reuse exact names. Tags are attached/detached via
update_workflow
addTags
/
removeTags
; there's no tag rename/delete tool.
archive_workflow
/
publish_workflow
/
unpublish_workflow
Soft-delete / activate / deactivate. Validate before publish.
publish_workflow
takes an optional
versionId
to re-publish a specific version.
search_executions
Search executions across the instance (filter by status, workflow, time range). Use for "list recent runs" / "failures in the last hour". Single executions:
get_execution
.
工具功能
search_workflows
通过
query
(名称/描述的子字符串)和/或
tags
(精确标签名称,逻辑与:必须包含所有标签)搜索实例中的工作流。这是跨工作流的主要发现工具。用于查找已存在的内容。
get_workflow_details
通过ID获取工作流的完整JSON。每次创建/更新后使用以验证连接。
search_folders
列出文件夹。你无法创建或移动文件夹。只能将工作流放入已存在的文件夹。
search_projects
列出项目。
list_tags
列出所有工作流标签(包含每个标签的
usageCount
)。在标记或过滤前先检查实例的标签词汇表,以便复用精确名称。通过
update_workflow
addTags
/
removeTags
添加/移除标签;没有重命名/删除标签的工具。
archive_workflow
/
publish_workflow
/
unpublish_workflow
软删除/激活/停用。发布前先验证。
publish_workflow
可传入可选的
versionId
以重新发布特定版本。
search_executions
搜索实例中的执行记录(按状态、工作流、时间范围过滤)。用于“列出最近运行记录”/“过去一小时内的失败记录”。单个执行记录:
get_execution

Workflow building

工作流构建

ToolWhat it does
get_sdk_reference
Fetch the n8n Workflow SDK reference. Read this before writing workflow code. Sections:
patterns
,
patterns_detailed
,
expressions
,
functions
,
rules
,
import
,
guidelines
,
design
,
all
.
get_workflow_best_practices
Fetch best-practices for a workflow technique. Call once per technique before searching nodes.
technique: "list"
discovers what's available.
search_nodes
Discover nodes by capability (e.g. "gmail", "slack", "schedule trigger"). Returns IDs plus discriminators (resource/operation/mode).
get_node_types
Fetch exact TypeScript parameter definitions for node IDs. Required before configuring any node. Don't guess parameter names.
explore_node_resources
Resolve the real values behind resource-locator (
@searchListMethod
) and load-options (
@loadOptionsMethod
) params: Slack channels, Sheets tabs/docs, DB tables/columns, model lists, labels. Needs a
credentialId
from
list_credentials
(pass
currentNodeParameters
for dependent lookups). Call after
get_node_types
to ground dropdown values instead of inventing IDs.
create_workflow_from_code
Save a workflow from SDK code. Always include a 1-2 sentence
description
. Pass
skillsUsed
(below).
update_workflow
Apply atomic ops (max 100, all-or-nothing): node/connection CRUD,
setNodeCredential
,
setNodeSettings
(per-node onError/retry/executeOnce),
setWorkflowSettings
(errorWorkflow, timezone, callerPolicy, timeouts, save-data policies; n8n 2.29.0+),
setNodeGroups
(canvas grouping),
setWorkflowMetadata
,
addTags
/
removeTags
(auto-create unknown names). Saves a draft; needs
publish_workflow
to go live. Pass
skillsUsed
(below).
validate_node_config
Schema-only validation of node configs (1-50 per call). Per-parameter errors, no graph noise. Side-channel for iteration/debug;
validate_workflow
still gates publish. For ai_tool subnodes set
isToolNode: true
.
validate_workflow
Validate full SDK code before create/update. Necessary but not sufficient: doesn't catch all wiring traps (
.to()
, merge index).
list_credentials
List accessible credentials (filter by type/project/etc). Returns metadata only, never secret values. Discover IDs before binding via
setNodeCredential
.
工具功能
get_sdk_reference
获取n8n工作流SDK参考。编写工作流代码前务必阅读。包含章节:
patterns
patterns_detailed
expressions
functions
rules
import
guidelines
design
all
get_workflow_best_practices
获取工作流技术的最佳实践。在搜索节点前针对每种技术调用一次。
technique: "list"
可查看可用技术列表。
search_nodes
按功能发现节点(如“gmail”、“slack”、“schedule trigger”)。返回ID及鉴别器(资源/操作/模式)。
get_node_types
获取节点ID的精确TypeScript参数定义。配置任何节点前必须调用。不要猜测参数名称。
explore_node_resources
解析资源定位符(
@searchListMethod
)和加载选项(
@loadOptionsMethod
)参数背后的真实值:Slack频道、表格标签/文档、数据库表/列、模型列表、标签。需要从
list_credentials
获取
credentialId
(传递
currentNodeParameters
进行依赖查找)。调用
get_node_types
后使用该工具获取下拉值,而非自行编造ID。
create_workflow_from_code
从SDK代码保存工作流。务必包含1-2句话的
description
。传入
skillsUsed
(见下文)。
update_workflow
应用原子操作(最多100个,要么全部成功要么全部失败):节点/连接的增删改查、
setNodeCredential
setNodeSettings
(每个节点的onError/重试/executeOnce)、
setWorkflowSettings
(错误工作流、时区、调用方策略、超时、数据保存策略;n8n 2.29.0+)、
setNodeGroups
(画布分组)、
setWorkflowMetadata
addTags
/
removeTags
(自动创建未知名称的标签)。保存为草稿;需要调用
publish_workflow
才能上线。传入
skillsUsed
(见下文)。
validate_node_config
仅验证节点配置的模式(每次调用1-50个节点)。返回每个参数的错误,无图结构干扰。用于迭代/调试的辅助通道;
validate_workflow
仍是发布的必经环节。对于ai_tool子节点,设置
isToolNode: true
validate_workflow
创建/更新前验证完整SDK代码。这是必要条件但不充分:无法捕获所有连接陷阱(
.to()
、合并索引)。
list_credentials
列出可访问的凭证(按类型/项目等过滤)。仅返回元数据,绝不返回机密值。在通过
setNodeCredential
绑定前先获取ID。

Workflow testing & execution

工作流测试与执行

ToolWhat it does
prepare_test_pin_data
Returns JSON Schemas (not data) for nodes that need pinning: triggers, credentialed nodes, and HTTP Request. You generate sample values.
test_workflow
Run with the pin data you supply. Auto-pins triggers, credentialed nodes, and HTTP Request. Code, Edit Fields, If, Data Tables, Execute Command, file ops, and sub-workflow calls run for real. Ask before running if any not-auto-pinned node has side effects. Pin data is per-execution only with no visual indicator in the execution viewer, so tell the user which nodes were pinned after the call. See
n8n-workflow-lifecycle-official
references/TESTING.md
.
execute_workflow
Production execution with the real trigger. Wire error handling first. Same side-effect rules as
test_workflow
.
executionMode
is required
— use
"manual"
for testing or validating the current workflow (including tests against live external services), and
"production"
only when intentionally running the published workflow as a live execution. Structured
inputs
for chat/form/webhook triggers. Returns an execution ID immediately without waiting; poll
get_execution
for results.
get_execution
Fetch an execution by
executionId
+
workflowId
(both required). Metadata only by default; set
includeData: true
(optionally
nodeNames
,
truncateData
) for node inputs/outputs.
工具功能
prepare_test_pin_data
返回需要固定数据的节点的JSON Schema(而非数据):触发器、带凭证的节点、HTTP Request。你需要生成示例值。
test_workflow
使用你提供的固定数据运行。自动固定触发器、带凭证的节点和HTTP Request。Code、Edit Fields、If、Data Tables、Execute Command、文件操作和子工作流调用会真实执行。若任何非自动固定的节点有副作用,请先询问用户再运行。固定数据仅针对本次执行,且在执行查看器中无视觉提示,因此调用后需告知用户哪些节点被固定。详见
n8n-workflow-lifecycle-official
references/TESTING.md
execute_workflow
使用真实触发器执行生产环境工作流。先配置错误处理。副作用规则与
test_workflow
相同。必须指定
executionMode
—— 使用
"manual"
测试或验证当前工作流(包括针对实时外部服务的测试),仅在有意将已发布工作流作为实时执行运行时使用
"production"
。为聊天/表单/webhook触发器提供结构化
inputs
。立即返回执行ID,无需等待;轮询
get_execution
获取结果。
get_execution
通过
executionId
+
workflowId
(两者均为必填)获取执行记录。默认仅返回元数据;设置
includeData: true
(可选
nodeNames
truncateData
)可获取节点输入/输出。

Data tables

数据表格

n8n's built-in tabular storage. Not an external service. Prefer over external DBs for workflow-local persistent state. Full surface:
ToolWhat it does
create_data_table
Create a new Data Table.
search_data_tables
Find existing Data Tables.
rename_data_table
/
rename_data_table_column
Rename.
add_data_table_column
/
delete_data_table_column
Schema changes.
add_data_table_rows
Append rows.
n8n内置的表格存储。不是外部服务。对于工作流本地持久化状态,优先使用它而非外部数据库。完整功能如下:
工具功能
create_data_table
创建新的数据表格。
search_data_tables
查找现有数据表格。
rename_data_table
/
rename_data_table_column
重命名。
add_data_table_column
/
delete_data_table_column
修改模式。
add_data_table_rows
追加行。

Version history

版本历史

ToolWhat it does
get_workflow_history
List a workflow's saved versions, newest first (n8n 2.29.0+).
get_workflow_version
Fetch a past version's full content by
versionId
.
restore_workflow_version
Re-apply a past version as the current draft (records a new history entry).
工具功能
get_workflow_history
列出工作流的已保存版本,按从新到旧排序(n8n 2.29.0+)。
get_workflow_version
通过
versionId
获取历史版本的完整内容。
restore_workflow_version
将历史版本重新应用为当前草稿(会记录新的历史条目)。

The protocol, in order

操作流程(按顺序)

For any n8n task:
  1. Recognize the matching skill from the index above. If the task spans skills, recognize the primary one first and pick up others as their triggers come up.
  2. Invoke the skill via the Skill tool before the first MCP call. Don't call n8n MCP tools blind.
  3. Read the SDK reference once per session before writing workflow code (
    get_sdk_reference
    ). The most efficient way to avoid SDK-shape mistakes.
  4. Get node types before configuring any node (
    get_node_types
    ). Guessing parameter names creates invalid workflows, sometimes silently.
  5. Validate before publish, verify after create/update. Validation catches schema errors. Verification (pulling the workflow back via
    get_workflow_details
    ) catches connection bugs validation misses.
  6. Surface drift when you spot it. If a tool or parameter doesn't match what a skill says, tell the user. Updates may be needed.
对于任何n8n任务:
  1. 从上述索引中识别匹配的Skill。若任务涉及多个Skill,先识别主要Skill,再根据触发时机调用其他Skill。
  2. 在首次调用MCP工具前通过Skill工具调用对应的Skill。不要盲目调用n8n MCP工具。
  3. 每次会话编写工作流代码前先阅读SDK参考
    get_sdk_reference
    )。这是避免SDK结构错误的最有效方式。
  4. 配置任何节点前先获取节点类型
    get_node_types
    )。猜测参数名称会导致无效工作流,有时甚至是静默失效。
  5. 发布前验证,创建/更新后确认。验证可发现模式错误。确认(通过
    get_workflow_details
    拉回工作流)可发现验证遗漏的连接问题。
  6. 发现差异时及时告知。若工具或参数与Skill描述不符,请告知用户。可能需要更新。

Reporting skills used

报告使用的Skill

create_workflow_from_code
and
update_workflow
take an optional
skillsUsed: string[]
. Pass it every time so the n8n team can measure plugin impact on MCP output.
  • Contents: report each skill exactly as the Skill tool names it, keeping the
    -official
    suffix:
    plugin:skill-official
    when plugin-namespaced, else bare
    skill-official
    . The suffix marks these as ours (vs other n8n packs); the plugin prefix marks plugin vs raw-skill usage.
  • Window: skills invoked since the last successful create/update call. Resets after each.
  • Limits: max 50 entries, each max 128 chars.
create_workflow_from_code
update_workflow
接受可选参数
skillsUsed: string[]
。每次调用都传入该参数,以便n8n团队衡量插件对MCP输出的影响。
  • 内容:严格按照Skill工具中的名称报告每个Skill,保留
    -official
    后缀:若为插件命名空间则为
    plugin:skill-official
    ,否则为
    skill-official
    。后缀标识这些是官方Skill(而非其他n8n工具包);插件前缀标识是插件使用还是原生Skill使用。
  • 范围:自上次成功创建/更新调用以来调用的Skill。每次成功创建/更新后重置。
  • 限制:最多50个条目,每个条目最多128字符。

Reviewing existing workflows or projects

审查现有工作流或项目

For audits, code-review, or any task framed as "review this workflow" / "what's wrong with this" / "audit this project," walk the review checklist:
n8n-workflow-lifecycle-official
references/REVIEW_CHECKLIST.md
. Severity-tiered (MUST FIX / SHOULD FIX / NICE TO HAVE), with each item linking to the canonical skill ref for the fix. Distinct from
VALIDATION_CHECKLIST.md
(pre-publish gates for in-progress builds): REVIEW_CHECKLIST is for any workflow, including ones built by anyone, any age.
A review agent should call
get_workflow_details
first, walk the checklist top to bottom, and report findings grouped by severity. MUST FIX items shouldn't be auto-fixed without user confirmation.
对于审计、代码审查或任何以“审查这个工作流”/“这个工作流有什么问题”/“审计这个项目”为主题的任务,请遵循审查清单
n8n-workflow-lifecycle-official
references/REVIEW_CHECKLIST.md
。清单按严重程度分层(必须修复/应该修复/建议修复),每个条目都链接到对应的官方Skill参考以获取修复方法。该清单与
VALIDATION_CHECKLIST.md
(针对在建工作流的发布前检查)不同:REVIEW_CHECKLIST适用于任何工作流,包括任何人在任何时间构建的工作流。
审查Agent应先调用
get_workflow_details
,从上到下逐一检查清单,并按严重程度分组报告发现的问题。必须修复的问题未经用户确认不得自动修复。

When in doubt

疑问处理

  • Can't find a workflow the user is referring to? If the user built it in the n8n UI, the most common reason is MCP access isn't enabled on that specific workflow: UI-created workflows can default to MCP-disabled and stay invisible until the per-workflow toggle is flipped. Ask the user: "Open the workflow in n8n, Settings, toggle MCP access on." (MCP-created workflows default on, so this only applies to UI-built ones.) See the
    n8n-workflow-lifecycle-official
    skill (
    references/MCP_ACCESS_PER_WORKFLOW.md
    ).
  • The user is right. If they say something's broken, believe them, even if you "know" the workflow is correct. Re-check parameters, fetch the n8n source from
    github.com/n8n-io/n8n
    to trace logic, find API docs for missing functions. The
    n8n-debugging-official
    skill walks through this.
  • If no skill fits and the task is non-trivial, ask before guessing.
  • These skills are opinionated, but considered best practice by the n8n team. The user can override any opinion by editing the SKILL.md. The plugin is just markdown.
  • 找不到用户提及的工作流? 如果用户在n8n UI中构建了该工作流,最常见的原因是该工作流未启用MCP访问:UI创建的工作流默认可能禁用MCP访问,且在开启每个工作流的开关前保持不可见。请询问用户:“在n8n中打开该工作流,进入设置,开启MCP访问。”(MCP创建的工作流默认开启,因此仅适用于UI构建的工作流)。详见
    n8n-workflow-lifecycle-official
    Skill的
    references/MCP_ACCESS_PER_WORKFLOW.md
  • 用户是对的。如果用户说某个功能无法正常工作,请相信他们,即使你“知道”工作流是正确的。重新检查参数,从
    github.com/n8n-io/n8n
    获取n8n源码追踪逻辑,查找缺失函数的API文档。
    n8n-debugging-official
    Skill会引导你完成这一过程。
  • 若找不到匹配的Skill且任务非 trivial,请先询问用户再猜测。
  • 这些Skill是有倾向性的,但被n8n团队视为最佳实践。用户可通过编辑SKILL.md覆盖任何规则。插件仅包含markdown文档。