This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
n8n community node package that provides a "Dynamic Node" — a wrapper node that accepts arbitrary n8n node JSON at runtime, constructs a sub-workflow around it, and executes it. This allows users to parameterize node configuration with expressions ({{ $json.xxx }}).
npm run build # tsc && gulp build:icons (compiles TS + copies SVG/PNG to dist/)
npm run lint # eslint on nodes/**/*.{ts,js} and package.json
npm run lint:fix # eslint with --fixNo test framework is configured. Validation is done via npm run lint and manual testing in an n8n instance.
The entire node lives in nodes/DynamicNode/:
-
DynamicNode.node.ts — Single
INodeTypeimplementation. Theexecute()method:- Enforces exactly 1 input item per call
- Parses the
nodeJsonparameter (string or object), extractsraw.nodes[0]if given a full workflow export - Strips
connections,pinData,metafrom the node JSON - Appends
" - Dynamic Node"to the node name, assigns a UUIDid - Deep-clones
subWorkflowTemplate.json, pushes the target node in, wires Execute Workflow Trigger → target node - Calls
this.executeWorkflow({ code: template }, items)to run the sub-workflow - Normalizes the result (handles array,
{ data: [...] }, null, or unexpected shapes)
-
subWorkflowTemplate.json — Minimal workflow skeleton: an Execute Workflow Trigger node connected to a
__PLACEHOLDER__node name that gets replaced at runtime.
- Tabs (2-space width), single quotes, semicolons, trailing commas
- Prettier config in
.prettierrc; ESLint 9.x flat config ineslint.config.cjs - Uses
eslint-plugin-n8n-nodes-basefor community node validation rules - Target: ES2022, CommonJS modules, strict TypeScript
- n8n API version 1 (
package.json→n8n.n8nNodesApiVersion) n8n-workflowis a peer/dev dependency (provided by n8n at runtime, not bundled)- Node engine >=20
- Published to npm as public package; only
dist/is included in the package - Deployed via GitHub Actions with npm OIDC Trusted Publisher (tokenless auth)