Back to skills
SkillHub ClubShip Full StackFull StackBackend

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.

Packaged view

This page reorganizes the original catalog entry around fit, installability, and workflow context first. The original raw source lives below.

Stars
3,131
Hot score
99
Updated
March 20, 2026
Overall rating
C4.0
Composite score
4.0
Best-practice grade
A88.4

Install command

npx @skill-hub/cli install openclaw-skills-n8n-api

Repository

openclaw/skills

Skill path: skills/codedao12/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.

Open repository

Best for

Primary workflow: Ship Full Stack.

Technical facets: Full Stack, Backend.

Target audience: everyone.

License: Unknown.

Original source

Catalog source: SkillHub Club.

Repository owner: openclaw.

This is still a mirrored public skill entry. Review the repository before installing into production workflows.

What it helps with

  • Install n8n-api into Claude Code, Codex CLI, Gemini CLI, or OpenCode workflows
  • Review https://github.com/openclaw/skills before adding n8n-api to shared team environments
  • Use n8n-api for development workflows

Works across

Claude CodeCodex CLIGemini CLIOpenCode

Favorites: 0.

Sub-skills: 0.

Aggregator: No.

Original source / Raw SKILL.md

---
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.
---

# n8n Public REST API

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.

## Availability
- The public API is unavailable during the free trial.
- Upgrade your plan to enable API access.

## Configuration

Recommended environment variables (or store in `.n8n-api-config`):

```bash
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.

## Auth header

All requests require this header:

```
X-N8N-API-KEY: $N8N_API_KEY
```

## Playground

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.

## Quick actions

### Workflows: list
```bash
curl -s -H "X-N8N-API-KEY: $N8N_API_KEY" "$N8N_API_BASE_URL/workflows" \
  | jq '.data[] | {id, name, active}'
```

### Workflows: details
```bash
curl -s -H "X-N8N-API-KEY: $N8N_API_KEY" "$N8N_API_BASE_URL/workflows/{id}"
```

### Workflows: activate or deactivate
```bash
# 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"
```

### Webhook trigger
```bash
# 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"}'
```

### Executions: list
```bash
# 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"
```

### Executions: retry
```bash
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"
```

## Common flows

### Health check summary
Count active workflows and recent failures:
```bash
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"
```

### Debug a failed run
1. List failed executions to get the execution ID.
2. Fetch execution details and identify the failing node.
3. Review node parameters and input data.
4. Suggest a fix based on the error message.

## Endpoint index

See `assets/n8n-api.endpoints.md` for the full list of endpoints.

## REST basics (optional)
If you want a refresher, these are commonly recommended:
- KnowledgeOwl: working with APIs (intro)
- IBM Cloud Learn Hub: what is an API / REST API
- MDN: overview of HTTP

## Notes and tips
- The n8n API node can call the public API from inside workflows.
- Webhook URLs are not the same as API URLs and do not use the API key header.
- Execution records may be pruned based on instance retention settings.


---

## Skill Companion Files

> Additional files collected from the skill directory layout.

### _meta.json

```json
{
  "owner": "codedao12",
  "slug": "n8n-api",
  "displayName": "n8n API",
  "latest": {
    "version": "1.0.1",
    "publishedAt": 1769963165997,
    "commit": "https://github.com/clawdbot/skills/commit/70d6b08ba4b5bfba971129fa0e2cabced7e67268"
  },
  "history": []
}

```

### assets/n8n-api-endpoints.md

```markdown
# n8n REST API — Endpoint Reference

## Base
- Base URL: `{instance}/api/v1`
- Auth header: `X-N8N-API-KEY: {key}`

## Environment variables (optional)
Set these to simplify examples:
```bash
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"
```

## Users (admin)
**Notes:** Owner-only on many instances. Supports `?limit`, `?cursor`, `?includeRole`, `?projectId`.

| Method | Endpoint | Description |
|--------|----------|-------------|
| GET | `/users` | List users |
| POST | `/users` | Create one or more users |
| GET | `/users/{id}` | Get user by ID or email |
| DELETE | `/users/{id}` | Delete user |
| PATCH | `/users/{id}/role` | Change user's global role |

## Audit
**Notes:** Generates a security audit report.

| Method | Endpoint | Description |
|--------|----------|-------------|
| POST | `/audit` | Generate audit report |

## Executions
**Notes:** Filters: `?status`, `?workflowId`, `?projectId`, `?includeData`, `?limit`, `?cursor`.

| Method | Endpoint | Description |
|--------|----------|-------------|
| GET | `/executions` | List executions |
| GET | `/executions/{id}` | Get execution details |
| DELETE | `/executions/{id}` | Delete execution record |
| POST | `/executions/{id}/retry` | Retry an execution (`loadWorkflow` optional) |

## Workflows
**Notes:** Filters: `?active`, `?tags`, `?name`, `?projectId`, `?excludePinnedData`, `?limit`, `?cursor`.

| Method | Endpoint | Description |
|--------|----------|-------------|
| POST | `/workflows` | Create workflow |
| GET | `/workflows` | List workflows |
| GET | `/workflows/{id}` | Get workflow by ID |
| PUT | `/workflows/{id}` | Update workflow |
| DELETE | `/workflows/{id}` | Delete workflow |
| GET | `/workflows/{id}/{versionId}` | Get a specific workflow version |
| POST | `/workflows/{id}/activate` | Publish/activate workflow (optional `versionId`, `name`, `description`) |
| POST | `/workflows/{id}/deactivate` | Deactivate workflow |
| PUT | `/workflows/{id}/transfer` | Transfer workflow to another project |
| GET | `/workflows/{id}/tags` | Get workflow tags |
| PUT | `/workflows/{id}/tags` | Update workflow tags |

## Credentials
**Notes:** `GET /credentials` is not listed in the current public API docs snapshot.

| Method | Endpoint | Description |
|--------|----------|-------------|
| POST | `/credentials` | Create credential |
| PATCH | `/credentials/{id}` | Update credential |
| DELETE | `/credentials/{id}` | Delete credential |
| GET | `/credentials/schema/{credentialTypeName}` | Get credential type schema |
| PUT | `/credentials/{id}/transfer` | Transfer credential to another project |

## Tags
**Notes:** Supports `?limit`, `?cursor`.

| Method | Endpoint | Description |
|--------|----------|-------------|
| POST | `/tags` | Create tag |
| GET | `/tags` | List tags |
| GET | `/tags/{id}` | Get tag by ID |
| PUT | `/tags/{id}` | Update tag |
| DELETE | `/tags/{id}` | Delete tag |

## Variables
**Notes:** Filters: `?projectId`, `?state`, `?limit`, `?cursor`.

| Method | Endpoint | Description |
|--------|----------|-------------|
| POST | `/variables` | Create variable |
| GET | `/variables` | List variables |
| PUT | `/variables/{id}` | Update variable |
| DELETE | `/variables/{id}` | Delete variable |

## Data Tables
**Notes:** Filters: `?filter` (jsonString), `?sortBy`, `?search`, `?limit`, `?cursor`.

| Method | Endpoint | Description |
|--------|----------|-------------|
| GET | `/data-tables` | List data tables |
| POST | `/data-tables` | Create data table |
| GET | `/data-tables/{dataTableId}` | Get data table |
| PATCH | `/data-tables/{dataTableId}` | Update data table |
| DELETE | `/data-tables/{dataTableId}` | Delete data table |
| GET | `/data-tables/{dataTableId}/rows` | Query rows |
| POST | `/data-tables/{dataTableId}/rows` | Insert rows (`returnType=count|id|all`) |
| PATCH | `/data-tables/{dataTableId}/rows/update` | Update rows by filter |
| POST | `/data-tables/{dataTableId}/rows/upsert` | Upsert row by filter |
| DELETE | `/data-tables/{dataTableId}/rows/delete` | Delete rows by filter |

## Projects
**Notes:** Supports `?limit`, `?cursor`.

| Method | Endpoint | Description |
|--------|----------|-------------|
| POST | `/projects` | Create project |
| GET | `/projects` | List projects |
| PUT | `/projects/{projectId}` | Update project |
| DELETE | `/projects/{projectId}` | Delete project |
| POST | `/projects/{projectId}/users` | Add users to project |
| PATCH | `/projects/{projectId}/users/{userId}` | Change user's project role |
| DELETE | `/projects/{projectId}/users/{userId}` | Remove user from project |

## Source Control
**Notes:** Requires Source Control feature.

| Method | Endpoint | Description |
|--------|----------|-------------|
| POST | `/source-control/pull` | Pull changes from remote repo |

## Webhooks (no auth needed)

| Type | URL Pattern |
|------|-------------|
| Production | `{instance}/webhook/{path}` |
| Test | `{instance}/webhook-test/{path}` |

## Pagination

All list endpoints support:
- `?limit=N` — Results per page (default 100, max 250)
- `?cursor=xxx` — Cursor for next page (returned in response)

## Response Format

```json
{
  "data": [...],
  "nextCursor": "string | null"
}
```

## Error Codes

| Code | Meaning |
|------|---------|
| 401 | Invalid or missing API key |
| 404 | Resource not found |
| 409 | Conflict |
| 429 | Rate limit exceeded |
| 500 | Internal server error |

```

n8n-api | SkillHub