n8n
Use this skill to reliably work with n8n as an automation engine: design workflows, generate/import/export workflow JSON, debug executions, and (when enabled) operate n8n via its public REST API.
Quick start (pick a path)
- Workflow design / changes (no API needed)
- Clarify: trigger, inputs, outputs, schedule, error handling, idempotency.
- Produce: either a workflow JSON export, or step-by-step UI instructions to build it.
- For JSON structure + conventions: read
{baseDir}/references/workflow-json.md.
- Operate n8n via REST API (recommended for repeatable ops)
- Requires:
N8N_BASE_URL + N8N_API_KEY.
- Use the helper script:
{baseDir}/scripts/n8n_api.py.
- For auth/pagination details: read
{baseDir}/references/n8n-api.md.
Workflow decision tree
- If the user says “here’s my exported workflow JSON” → validate/modify JSON, return a new JSON export.
- If the user says “build this in my n8n UI” → produce exact node-by-node build instructions.
- If the user says “deploy / activate / list / run / inspect executions” → use the REST API helper script.
- If the user says “webhook isn’t firing / workflow failed” → use the debugging checklist in
{baseDir}/references/troubleshooting.md.
Core workflows
A) Create or update a workflow (JSON-first)
- Define the spec (minimal)
- Trigger (Webhook/Cron/Manual)
- Data sources + credentials
- Transformations (expressions/code)
- Side effects (write/send)
- Error strategy (continue on fail vs stop, retries, alerting)
- Create/modify workflow JSON
- Prefer small diffs.
- Keep credentials references by name/id only; never embed secrets.
- See
{baseDir}/references/workflow-json.md.
- Import/update
- UI: import JSON.
- API: use
{baseDir}/scripts/n8n_api.py (examples in references/n8n-api.md).
- Activate + verify
- Activate workflow.
- Run a controlled test; inspect execution + node outputs.
B) Debug an execution
- Confirm the trigger event occurred (webhook hit / schedule ran / manual start).
- Inspect the last execution and identify the failing node.
- Check common causes: missing credentials, expression errors, data shape mismatch, rate limits.
- Add observability: temporary Set/Code nodes to log key fields; consider an “Error Trigger” workflow.
Use {baseDir}/references/troubleshooting.md for a systematic checklist.
C) Build a webhook-based integration
- Choose trigger: Webhook node.
- Decide contract: method, path, auth, expected JSON schema.
- Add validation: fail fast for missing required fields.
- Make it idempotent: detect duplicate events (store event id / hash).
- Respond: set explicit HTTP response body/status.
Security + safety
- Treat API keys as secrets. Never paste keys into workflow JSON, prompts, or logs.
- Use least privilege scopes where available.
- Prefer test instances / test workflows for destructive operations.
See {baseDir}/references/security.md.
Bundled resources
{baseDir}/scripts/n8n_api.py: lightweight CLI for n8n REST API calls (GET/POST/PATCH/DELETE).
{baseDir}/references/n8n-api.md: auth, base URL conventions, pagination, example calls.
{baseDir}/references/workflow-json.md: how to read/modify workflow exports safely.
{baseDir}/references/troubleshooting.md: debugging playbook (webhooks, executions, credentials, data mapping).
{baseDir}/assets/workflow-spec-template.md: a fill-in template for new automations.
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: n8n3description: Design, build, debug, and operate n8n automations. Use when working with n8n workflows (JSON), nodes, expressions, triggers/webhooks, executions, credentials, or when calling the n8n public REST API to list/create/update/activate workflows and inspect executions. Use when this capability is needed.4---56# n8n78Use this skill to reliably work with n8n as an automation engine: design workflows, generate/import/export workflow JSON, debug executions, and (when enabled) operate n8n via its public REST API.910## Quick start (pick a path)11121) **Workflow design / changes (no API needed)**13- Clarify: trigger, inputs, outputs, schedule, error handling, idempotency.14- Produce: either a workflow JSON export, or step-by-step UI instructions to build it.15- For JSON structure + conventions: read `{baseDir}/references/workflow-json.md`.16172) **Operate n8n via REST API (recommended for repeatable ops)**18- Requires: `N8N_BASE_URL` + `N8N_API_KEY`.19- Use the helper script: `{baseDir}/scripts/n8n_api.py`.20- For auth/pagination details: read `{baseDir}/references/n8n-api.md`.2122## Workflow decision tree2324- If the user says **“here’s my exported workflow JSON”** → validate/modify JSON, return a new JSON export.25- If the user says **“build this in my n8n UI”** → produce exact node-by-node build instructions.26- If the user says **“deploy / activate / list / run / inspect executions”** → use the REST API helper script.27- If the user says **“webhook isn’t firing / workflow failed”** → use the debugging checklist in `{baseDir}/references/troubleshooting.md`.2829## Core workflows3031### A) Create or update a workflow (JSON-first)32331. Define the spec (minimal)34- Trigger (Webhook/Cron/Manual)35- Data sources + credentials36- Transformations (expressions/code)37- Side effects (write/send)38- Error strategy (continue on fail vs stop, retries, alerting)39402. Create/modify workflow JSON41- Prefer small diffs.42- Keep credentials references by name/id only; never embed secrets.43- See `{baseDir}/references/workflow-json.md`.44453. Import/update46- UI: import JSON.47- API: use `{baseDir}/scripts/n8n_api.py` (examples in `references/n8n-api.md`).48494. Activate + verify50- Activate workflow.51- Run a controlled test; inspect execution + node outputs.5253### B) Debug an execution54551. Confirm the trigger event occurred (webhook hit / schedule ran / manual start).562. Inspect the last execution and identify the failing node.573. Check common causes: missing credentials, expression errors, data shape mismatch, rate limits.584. Add observability: temporary Set/Code nodes to log key fields; consider an “Error Trigger” workflow.5960Use `{baseDir}/references/troubleshooting.md` for a systematic checklist.6162### C) Build a webhook-based integration63641. Choose trigger: **Webhook** node.652. Decide contract: method, path, auth, expected JSON schema.663. Add validation: fail fast for missing required fields.674. Make it idempotent: detect duplicate events (store event id / hash).685. Respond: set explicit HTTP response body/status.6970## Security + safety7172- Treat API keys as secrets. Never paste keys into workflow JSON, prompts, or logs.73- Use least privilege scopes where available.74- Prefer test instances / test workflows for destructive operations.7576See `{baseDir}/references/security.md`.7778## Bundled resources7980- `{baseDir}/scripts/n8n_api.py`: lightweight CLI for n8n REST API calls (GET/POST/PATCH/DELETE).81- `{baseDir}/references/n8n-api.md`: auth, base URL conventions, pagination, example calls.82- `{baseDir}/references/workflow-json.md`: how to read/modify workflow exports safely.83- `{baseDir}/references/troubleshooting.md`: debugging playbook (webhooks, executions, credentials, data mapping).84- `{baseDir}/assets/workflow-spec-template.md`: a fill-in template for new automations.8586---87> Converted and distributed by [TomeVault](https://tomevault.io/claim/RamithaW) — claim your Tome and manage your conversions.88<!-- tomevault:4.0:skill_md:2026-04-16 -->