n8n
n8n
Use REST API to create/update/activate workflows. Use MCP to list and run enabled workflows.
When to use
- Authoring (no UI): REST API
- Running/triggering workflows: MCP
- Use
n8nctl(uv script) for REST without curl/jq
Auth/config check policy: do not stop at echo $N8N_BASE_URL or echo $N8N_API_KEY in the parent shell. If credentials may live in the skill-local .env, prefer uv run scripts/n8nctl.py ...; that entrypoint auto-loads the env file using the lookup order below. Only report missing credentials after the real command path fails.
Preconditions
- n8n instance URL (cloud, self-hosted, or local)
- REST API key (X-N8N-API-KEY)
- MCP URL + access token (instance-level MCP)
- Workflows marked
availableInMCP
Node discovery (tested)
- Exa: built-in node library docs (
https://docs.n8n.io/integrations/builtin/node-types/) - Context7:
/n8n-io/n8n-docsfor node docs + examples - DeepWiki: repo Q&A over
n8n-io/n8n-docs; pair withghor workflow export to confirmtypestrings gh: list node folders, then search by keyword and open the*.node.jsonfile to read thenodefield- Export workflows to confirm exact
typestrings in your instance
Quick start (REST)
If credentials live only in the skill-local .env, prefer uv run scripts/n8nctl.py ... from the Scripts section; the raw curl examples below assume the relevant env is already exported into the current process.
# list workflows
curl -sS -H "X-N8N-API-KEY: <N8N_API_KEY>" \
"<N8N_BASE_URL>/api/v1/workflows?active=true"
# create workflow (body from template)
curl -sS -X POST -H "X-N8N-API-KEY: <N8N_API_KEY>" \
-H "Content-Type: application/json" \
-d @workflow.json \
"<N8N_BASE_URL>/api/v1/workflows"
MCP (runtime)
Use the MCP URL for your instance (example: N8N_MCP_URL).
# stdio proxy for MCP clients that need headers
bun x supergateway --streamableHttp "<N8N_MCP_URL>" \
--header "Authorization: Bearer <N8N_MCP_TOKEN>"
Environment
- Tracked template:
.env.example - Common vars:
N8N_BASE_URLN8N_API_KEYN8N_MCP_URLN8N_MCP_TOKEN
n8nctl.pyauto-loads from:N8N_ENV_FILE$SKILLS_DIR/n8n/.env- nearest ancestor
skills/n8n/.env
- Raw
curl/supergatewaycommands still read process env only; source.envyourself or use direnv.
Notes
- Workflows include a trigger node for MCP execution
- Keep
--header "Authorization: Bearer <...>"as a single, quoted argument n8nctluses REST endpoints and requiresN8N_BASE_URL+N8N_API_KEY- Replace
<N8N_CONTAINER>with your Docker container name
CLI (self-hosted)
For Docker installs, run inside the container:
docker exec -it "<N8N_CONTAINER>" n8n export:workflow --all
docker exec -it "<N8N_CONTAINER>" n8n import:workflow --input=/path/to/workflow.json
Scripts
Minimal REST CLI (no curl):
uv run scripts/n8nctl.py list --limit 5
uv run scripts/n8nctl.py get <WORKFLOW_ID>
uv run scripts/n8nctl.py create <WORKFLOW.json>
uv run scripts/n8nctl.py update <WORKFLOW_ID> <WORKFLOW.json>
uv run scripts/n8nctl.py activate <WORKFLOW_ID>
uv run scripts/n8nctl.py mcp-enable <WORKFLOW_ID>
uv run scripts/n8nctl.py validate <WORKFLOW.json>
Query templates
See assets/query-templates.json.
Reference
See reference.md.
Cookbook
See cookbook/basics.md and cookbook/blueprints.md.
More from anntnzrb/agents
golang
Develop Go (Golang) applications using modern patterns, popular libraries, and idiomatic design. Activate when working with .go files, go.mod, go.sum, or user mentions Go, Golang, goroutines, channels, or Go libraries like gin, cobra, gorm.
17gleam
Develop with Gleam using idiomatic patterns, TDD, and type-driven design. Activate when working with .gleam files, gleam.toml, or user mentions Gleam, BEAM, or Erlang.
16agent-browser
Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction.
15ast-grep
Read-only structural code search with ast-grep/sg. Grep/rg/sed alternative for AST-aware CLI exploration, pattern search, and fast code discovery. Activates on ast-grep/sg, structural search, AST search, find usages, tree-sitter.
14summarize
Operate `@steipete/summarize` end-to-end via `bun x @steipete/summarize` for URL/file/media summarization, extract-only output, YouTube transcript and slide workflows, model/language/length tuning, CLI-backend routing (`--cli`), cache/config management, and `refresh-free` model maintenance. Use when users ask to summarize or extract content, transcribe audio/video, run slide extraction, tune summarize config/env keys, or troubleshoot summarize command failures.
14python
Develop Python applications using modern patterns, uv, functional-first design, and production-first practices. Use this whenever working with .py files, pyproject.toml, uv commands, pip/pip3, poetry, virtualenv/venv, inline script metadata, or Python tooling like pytest, mypy, ruff, asyncio, itertools, functools, or dataclasses. If the task involves running Python, managing Python dependencies, creating environments, or building Python packages, load this skill and prefer uv-oriented workflows.
13