An expert-level AI agent that lives inside your n8n instance, capable of creating, debugging, testing, monitoring, and optimizing workflows via the n8n REST API. Built on the OpenClaw agent framework.
N8nOps acts as your personal automation architect. Instead of manually building workflows in the n8n UI, you describe what you need in plain language, and the agent handles the rest:
- Create workflows from natural language descriptions
- Debug & fix failed executions by tracing errors to specific nodes
- Monitor health with automatic heartbeat checks every 30 minutes
- Manage credentials and guide setup when needed
- Build AI pipelines with LangChain integration (RAG, agents, tools, memory)
- Optimize existing workflows for performance and reliability
| Component | Technology |
|---|---|
| Primary LLM | Anthropic Claude Sonnet 4 |
| Fallback LLM | OpenAI GPT-4o |
| Target Platform | n8n 2.0.0 |
| Agent Framework | OpenClaw |
| Communication | REST API via curl |
openclaw-n8n-agent/
├── openclaw.json # Agent configuration
├── SOUL.md # Core identity & n8n expertise
├── IDENTITY.md # Personality definition
├── AGENTS.md # Workspace protocols
├── TOOLS.md # n8n connection details & API patterns
├── BOOTSTRAP.md # First-run setup guide
├── MEMORY.md # Long-term memory
├── HEARTBEAT.md # Health monitoring protocol
├── USER.md # User profile
├── memory/ # Session-based memory files
└── skills/n8n/ # Expertise modules
├── SKILL.md # n8n mastery overview
├── node-catalog.md # 65+ verified node types
├── ai-patterns.md # AI workflow connection patterns
├── api-reference.md # n8n REST API endpoints
└── templates.md # Ready-to-use workflow templates
- Create, edit, activate/deactivate, and delete workflows
- Validate workflow JSON before deployment
- Show diffs when updating workflows for human review
- List and filter executions by status, workflow, or date range
- Diagnose failed executions and identify root causes
- Retry failed workflows and clean up old logs
- Build AI agent pipelines with tool use
- Configure LLM models (OpenAI, Anthropic, Ollama, Google Gemini)
- Set up conversational memory (Buffer Window, Redis, Postgres)
- Implement RAG workflows with vector store integration
- Supported vector stores: Pinecone, Postgres, Qdrant, In-Memory
- Automatic heartbeat checks every 30 minutes
- Alerts on failed executions and critical workflow failures
- Tracks active workflow count and instance health
- n8n instance running (default:
http://localhost:5678) - n8n version 2.0.0
- n8n API key
-
Verify n8n is accessible:
curl -s -o /dev/null -w "%{http_code}" http://localhost:5678/healthz # Expected: 200
-
Create an API key in n8n UI:
- Go to Settings > API > Create API Key
-
Test the API key:
curl -s -H "X-N8N-API-KEY: YOUR_KEY" http://localhost:5678/api/v1/workflows -
Set environment variable:
export N8N_API_KEY=YOUR_API_KEY -
Run bootstrap to inventory workflows and credentials on first launch.
You need a running n8n 2.0.0 instance. You can set it up with Docker or npm:
Docker (recommended):
docker run -it --rm \
--name n8n \
-p 5678:5678 \
-v n8n_data:/home/node/.n8n \
n8nio/n8n:2.0.0npm:
npx n8n@2.0.0n8n will be available at http://localhost:5678.
- Open
http://localhost:5678in your browser - Complete the initial setup (create owner account)
- Go to Settings > API
- Click Create API Key
- Copy the generated key
Edit openclaw.json to point to your n8n instance:
{
"agent": {
"model": "anthropic/claude-sonnet-4-20250514",
"fallbackModel": "openai/gpt-4o",
"workspace": "./",
"thinkingDefault": "high",
"timeoutSeconds": 600,
"heartbeat": {
"every": "30m"
}
},
"tools": {
"exec": { "enabled": true, "policy": "standard" },
"web_fetch": { "enabled": true },
"web_search": { "enabled": true },
"browser": { "enabled": true },
"apply_patch": { "enabled": true },
"diffs": { "enabled": true }
},
"env": {
"N8N_BASE_URL": "http://localhost:5678",
"N8N_API_BASE": "http://localhost:5678/api/v1"
}
}If your n8n runs on a different host/port, update the env.N8N_BASE_URL and env.N8N_API_BASE values accordingly.
Export the n8n API key as an environment variable:
export N8N_API_KEY=your-api-key-herecurl -s -H "X-N8N-API-KEY: $N8N_API_KEY" http://localhost:5678/api/v1/workflowsIf you get a JSON response with workflow data (or an empty data array), the connection is working.
On first run, the agent will:
- Verify n8n instance accessibility
- Inventory all existing workflows and credentials
- Populate
MEMORY.mdwith the workflow catalog - Update
TOOLS.mdwith credential inventory - Load skill files from
skills/n8n/for node types, AI patterns, and templates
After bootstrap completes, the agent is ready to build, debug, and manage workflows.
| Option | Default | Description |
|---|---|---|
agent.model |
anthropic/claude-sonnet-4-20250514 |
Primary LLM for reasoning |
agent.fallbackModel |
openai/gpt-4o |
Fallback when primary is unavailable |
agent.thinkingDefault |
high |
Reasoning depth (high = deep analysis) |
agent.timeoutSeconds |
600 |
Max seconds per operation |
agent.heartbeat.every |
30m |
Health check interval |
session.reset.idleMinutes |
10080 |
Session reset after 7 days idle |
env.N8N_BASE_URL |
http://localhost:5678 |
n8n instance URL |
env.N8N_API_BASE |
http://localhost:5678/api/v1 |
n8n API endpoint |
The agent communicates with n8n through these REST API endpoints:
| Method | Endpoint | Purpose |
|---|---|---|
GET |
/api/v1/workflows |
List all workflows |
POST |
/api/v1/workflows |
Create a new workflow |
GET |
/api/v1/workflows/:id |
Get workflow details |
PUT |
/api/v1/workflows/:id |
Update a workflow |
DELETE |
/api/v1/workflows/:id |
Delete a workflow |
POST |
/api/v1/workflows/:id/activate |
Activate a workflow |
POST |
/api/v1/workflows/:id/deactivate |
Deactivate a workflow |
POST |
/api/v1/workflows/:id/run |
Trigger execution |
GET |
/api/v1/executions |
List executions |
GET |
/api/v1/executions/:id |
Get execution details |
GET |
/api/v1/credentials |
List credentials |
All API calls require the X-N8N-API-KEY header for authentication.
- Confirms before activating/deactivating production workflows
- Confirms before deleting workflows
- Never hardcodes API keys or secrets
- Always reads current state before modifying (GET before PUT)
- Shows diffs for all workflow updates
This repository has been scanned and verified as safe by VirusTotal — a trusted security service that aggregates results from 95+ antivirus engines and URL scanners.
Scan Result: ✅ 0/95 — No security vendors flagged this repository as malicious.
| Detail | Value |
|---|---|
| Scanned URL | https://github.com/samansalari/Openclaw-N8N |
| Detection Ratio | 0 / 95 |
| Community Score | +1 👍 |
| Status | 200 OK |
| Content Type | text/html; charset=utf-8 |
All 95 security vendors — including BitDefender, CyRadar, AlienVault, CRDF, Dr.Web, and others — returned a Clean verdict.
Saman Salari - Developer, Product Designer & AI Enthusiast
Based in the UK, focused on AI engineering to create smart, impactful digital experiences. 10+ years of experience building scalable web applications and automation systems using React, Next.js, Node.js, and AI-powered development tools.
- Website: samansalari.com
- LinkedIn: linkedin.com/in/samansalari
- X: x.com/samansalari
- Email: me@samansalari.com
This project is open source. See LICENSE for details.

