Operate n8n via its public REST API from OpenClaw. Use for workflow management, executions, and automation tasks such as listing, creating, publishing, triggering, or troubleshooting. Works with both self-hosted n8n and n8n Cloud.
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install n8n-api或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install n8n-api⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/n8n-api/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: n8n-api description: Operate n8n via its public REST API from OpenClaw. Use for workflow management, executions, and automation tasks such as listing, creating, publishing, triggering, or troubleshooting. Works with both self-hosted n8n and n8n Cloud. ---
Use this skill when you need to drive n8n programmatically. It covers the same core actions you use in the UI: workflows, executions, tags, credentials, projects, and more.
Recommended environment variables (or store in .n8n-api-config):
export N8N_API_BASE_URL="https://your-instance.app.n8n.cloud/api/v1" # or http://localhost:5678/api/v1
export N8N_API_KEY="your-api-key-here"
Create the API key in: n8n Settings → n8n API → Create an API key.
All requests require this header:
X-N8N-API-KEY: $N8N_API_KEY
The API playground is only available on self-hosted n8n and operates on real data. For safe experiments, use a test workflow or a separate test instance.
curl -s -H "X-N8N-API-KEY: $N8N_API_KEY" "$N8N_API_BASE_URL/workflows" \
| jq '.data[] | {id, name, active}'
curl -s -H "X-N8N-API-KEY: $N8N_API_KEY" "$N8N_API_BASE_URL/workflows/{id}"
# Activate (publish)
curl -s -X POST -H "X-N8N-API-KEY: $N8N_API_KEY" \
-H "Content-Type: application/json" \
-d '{"versionId":"","name":"","description":""}' \
"$N8N_API_BASE_URL/workflows/{id}/activate"
# Deactivate
curl -s -X POST -H "X-N8N-API-KEY: $N8N_API_KEY" \
"$N8N_API_BASE_URL/workflows/{id}/deactivate"
# Production webhook
curl -s -X POST "$N8N_API_BASE_URL/../webhook/{webhook-path}" \
-H "Content-Type: application/json" \
-d '{"key":"value"}'
# Test webhook
curl -s -X POST "$N8N_API_BASE_URL/../webhook-test/{webhook-path}" \
-H "Content-Type: application/json" \
-d '{"key":"value"}'
# Recent executions
curl -s -H "X-N8N-API-KEY: $N8N_API_KEY" \
"$N8N_API_BASE_URL/executions?limit=10" \
| jq '.data[] | {id, workflowId, status, startedAt}'
# Failed only
curl -s -H "X-N8N-API-KEY: $N8N_API_KEY" \
"$N8N_API_BASE_URL/executions?status=error&limit=5"
curl -s -X POST -H "X-N8N-API-KEY: $N8N_API_KEY" \
-H "Content-Type: application/json" \
-d '{"loadWorkflow":true}' \
"$N8N_API_BASE_URL/executions/{id}/retry"
Count active workflows and recent failures:
ACTIVE=$(curl -s -H "X-N8N-API-KEY: $N8N_API_KEY" \
"$N8N_API_BASE_URL/workflows?active=true" | jq '.data | length')
FAILED=$(curl -s -H "X-N8N-API-KEY: $N8N_API_KEY" \
"$N8N_API_BASE_URL/executions?status=error&limit=100" \
| jq '[.data[] | select(.startedAt > (now - 86400 | todate))] | length')
echo "Active workflows: $ACTIVE | Failed (24h): $FAILED"
See assets/n8n-api.endpoints.md for the full list of endpoints.
If you want a refresher, these are commonly recommended:
安装 n8n API 后,可以对 AI 说这些话来触发它
Help me get started with n8n API
Explains what n8n API does, walks through the setup, and runs a quick demo based on your current project
Use n8n API to operate n8n via its public REST API from OpenClaw
Invokes n8n API with the right parameters and returns the result directly in the conversation
What can I do with n8n API in my ai agent & automation workflow?
Lists the top use cases for n8n API, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/n8n-api/ 目录(个人级,所有项目可用),或 .claude/skills/n8n-api/(项目级)。重启 AI 客户端后,用 /n8n-api 主动调用,或让 AI 根据上下文自动发现并使用。
n8n API 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
n8n API 可免费安装使用。请查阅仓库了解许可证信息。
Operate n8n via its public REST API from OpenClaw. Use for workflow management, executions, and automation tasks such as listing, creating, publishing, triggering, or troubleshooting. Works with both self-hosted n8n and n8n Cloud.
n8n API 属于「AI Agent & Automation」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my ai agent & automation tasks using n8n API
Identifies repetitive steps in your workflow and sets up n8n API to handle them automatically