n8n-apiOperate 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.
Install via ClawdBot CLI:
clawdbot install codedao12/n8n-apiUse 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:
Generated Mar 1, 2026
A company uses this skill to periodically check the health of their n8n workflows by counting active workflows and recent failures via the health check summary. If failures exceed a threshold, it triggers alerts to the operations team for immediate troubleshooting, ensuring minimal downtime in automated processes.
An e-commerce platform leverages this skill to programmatically activate or deactivate n8n workflows based on real-time sales events or marketing campaigns. For example, activating a promotional email workflow during a flash sale and deactivating it afterward to optimize resource usage and campaign timing.
A data analytics firm uses this skill to automatically list failed executions, retrieve details to identify failing nodes, and retry executions after fixes. This streamlines debugging of data integration workflows, reducing manual intervention and improving data pipeline reliability.
A SaaS provider employs this skill to manage workflows across multiple client instances by listing, creating, and publishing workflows via the API. This enables scalable automation setup and maintenance for different tenants, ensuring consistent service delivery and customization.
A business offers managed automation services using this skill to build, monitor, and maintain n8n workflows for clients. They charge subscription fees based on the number of workflows or executions managed, providing ongoing support and optimization to ensure client automation runs smoothly.
A consulting firm uses this skill to integrate n8n with clients' existing systems via the API, offering custom workflow development and troubleshooting. Revenue comes from project-based fees or hourly rates for setup, training, and ongoing maintenance services.
A company develops and sells pre-built n8n workflow templates that leverage this skill for easy deployment and management. They generate revenue through one-time purchases or licensing fees, with optional add-ons for API-driven customization and support.
💬 Integration Tip
Ensure API keys are securely stored as environment variables and test webhooks separately from production endpoints to avoid unintended triggers in live workflows.
Automatically update Clawdbot and all installed skills once daily. Runs via cron, checks for updates, applies them, and messages the user with a summary of what changed.
Full desktop computer use for headless Linux servers. Xvfb + XFCE virtual desktop with xdotool automation. 17 actions (click, type, scroll, screenshot, drag,...
Essential Docker commands and workflows for container management, image operations, and debugging.
Tool discovery and shell one-liner reference for sysadmin, DevOps, and security tasks. AUTO-CONSULT this skill when the user is: troubleshooting network issues, debugging processes, analyzing logs, working with SSL/TLS, managing DNS, testing HTTP endpoints, auditing security, working with containers, writing shell scripts, or asks 'what tool should I use for X'. Source: github.com/trimstray/the-book-of-secret-knowledge
Deploy applications and manage projects with complete CLI reference. Commands for deployments, projects, domains, environment variables, and live documentation access.
Monitor topics of interest and proactively alert when important developments occur. Use when user wants automated monitoring of specific subjects (e.g., product releases, price changes, news topics, technology updates). Supports scheduled web searches, AI-powered importance scoring, smart alerts vs weekly digests, and memory-aware contextual summaries.