n8n Workflows (optional stack)
Not part of the Core Pack. Use only when the repository contains or requires n8n workflows.
Support checklist for reviewing workflow changes: checklist-n8n.md.
Routing: small, in-scope workflow edit: apply this skill in the main window. Large or isolated batch (or when it needs its own context): hand to the n8n-workflows Task subagent (demoted, dogfood-only). Docs work routes to the docs-repo agent; security review to security-reviewer.
Workflow JSON structure
- nodes: array of nodes (Webhook, HTTP Request, Code, Postgres, Switch, IF, Execute Workflow, Respond Webhook, etc.).
- connections: mapping from node outputs to node inputs.
- settings: workflow metadata (name, pinData, etc.).
- credentials: references by id; never commit secrets in the JSON.
Recommended patterns
- Webhook → Switch/IF → Execute Workflow → Respond Webhook: typical flow to route by state between sub-workflows.
- State machine: sessions with
state (e.g., START, WAIT_INPUT, WAIT_CONFIRM, DONE); document in docs/context/ or README.
- Documentation: maintain or create
docs/context/, docs/n8n-manual-update-*.md for manual changes without re-importing.
Best practices
- Credentials via n8n Credentials or environment variables (
$env.VAR); never hardcoded values in JSON.
- After importing workflows, adjust sub-workflow IDs in Execute Workflow nodes (IDs are generated by n8n).
- Use
$json, $env, queryReplacement (Postgres) per docs; for Postgres with $1, $2, fill Query Parameters (e.g., {{ [$json.field] }}).
- Version JSONs in Git; maintain idempotency and document required credentials in README or env.example.
1---2name: n8n-workflows3description: Workflows n8n — only when the project uses n8n (stack, not Core Pack). Edit workflow JSON or when the user mentions n8n.4---56# n8n Workflows (optional stack)78**Not part of the Core Pack.** Use only when the repository contains or requires n8n workflows.910Support checklist for reviewing workflow changes: [checklist-n8n.md](checklist-n8n.md).1112**Routing:** small, in-scope workflow edit: apply this skill in the main window. Large or isolated batch (or when it needs its own context): hand to the `n8n-workflows` Task subagent (demoted, dogfood-only). Docs work routes to the `docs-repo` agent; security review to `security-reviewer`.1314## Workflow JSON structure1516- **nodes:** array of nodes (Webhook, HTTP Request, Code, Postgres, Switch, IF, Execute Workflow, Respond Webhook, etc.).17- **connections:** mapping from node outputs to node inputs.18- **settings:** workflow metadata (name, pinData, etc.).19- **credentials:** references by id; never commit secrets in the JSON.2021## Recommended patterns2223- **Webhook → Switch/IF → Execute Workflow → Respond Webhook:** typical flow to route by state between sub-workflows.24- **State machine:** sessions with `state` (e.g., START, WAIT_INPUT, WAIT_CONFIRM, DONE); document in `docs/context/` or README.25- **Documentation:** maintain or create `docs/context/`, `docs/n8n-manual-update-*.md` for manual changes without re-importing.2627## Best practices2829- Credentials via n8n **Credentials** or environment variables (`$env.VAR`); never hardcoded values in JSON.30- After importing workflows, adjust sub-workflow IDs in **Execute Workflow** nodes (IDs are generated by n8n).31- Use `$json`, `$env`, `queryReplacement` (Postgres) per docs; for Postgres with `$1`, `$2`, fill **Query Parameters** (e.g., `{{ [$json.field] }}`).32- Version JSONs in Git; maintain idempotency and document required credentials in README or env.example.