n8n/packages/@n8n/workflow-sdk
n8n-assistant[bot] 0fe134a59d Merge commit '522d8795b03406bc31d7c096f95431e7894000b6' into 3.x
# Conflicts:
#	packages/@n8n/backend-common/src/modules/__tests__/module-registry.test.ts
#	packages/@n8n/nodes-langchain/nodes/agents/Agent/test/utils.test.ts
#	packages/cli/package.json
#	packages/cli/src/scaling/webhook-response-relay.ts
2026-09-23 06:03:37 +00:00
..
scripts test: Migrate @n8n/workflow-sdk from Jest to Vitest (no-changelog) (#31546) 2026-06-03 06:08:31 +00:00
src revert: feat(core)!: Remove the "Any workflow" caller policy (#39223) 2026-09-22 08:57:31 -04:00
test-fixtures feat: Remove dead nodes (#34327) 2026-09-21 06:04:35 +00:00
.gitignore test: Harden workflow-sdk debug artifact extension against Rolldown (#32089) 2026-06-15 11:17:43 +00:00
eslint.config.mjs chore: Remove dead ESLint config and add lint parity tooling (no-changelog) (#38343) 2026-09-11 13:33:07 +03:00
package.json 🚀 Release 2.41.0 (#39228) 2026-09-22 07:18:44 +00:00
README.md feat(ai-builder): Add code-base workflow builder (#24535) 2026-02-10 12:24:27 +00:00
tsconfig.build.json chore: Migrate the rest of packages/@n8n to typescript 7 (#34332) 2026-07-17 10:45:58 +03:00
tsconfig.json chore: Migrate the rest of packages/@n8n to typescript 7 (#34332) 2026-07-17 10:45:58 +03:00
vitest.config.ts test: Enable restoreMocks by default in shared vitest configs (#33526) 2026-07-03 10:03:01 +00:00

Banner image

@n8n/workflow-sdk

TypeScript SDK for programmatically creating n8n workflows.

Features

  • Fluent builder API for workflow creation
  • Full type safety with TypeScript
  • Code generation from JSON workflows
  • Control flow support (If, Switch, Merge, Loop)
  • Built-in validation
  • AI/LangChain node integration

Usage

import { WorkflowBuilder, manual, httpRequest } from '@n8n/workflow-sdk';

const workflow = new WorkflowBuilder()
  .withName('My Workflow')
  .addTrigger(manual())
  .then(httpRequest({ url: 'https://api.example.com/data' }))
  .build();

License

You can find the license information here