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
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
Real data. Real impact.
Emerging
Developers
Per week
Open source
Skills give you superpowers. Install in 30 seconds.
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:
No automatic installation available. Please visit the source repository for installation instructions.
View Installation Instructions1,500+ AI skills, agents & workflows. Install in 30 seconds. Part of the Torly.ai family.
© 2026 Torly.ai. All rights reserved.