n8n/packages/@n8n/workflow-sdk
Albert Alises bd5cd31093
Some checks are pending
CI: Master (Build, Test, Lint) / Build for Github Cache (push) Waiting to run
CI: Master (Build, Test, Lint) / Unit tests (22.22.3) (push) Waiting to run
CI: Master (Build, Test, Lint) / Unit tests (24.15.0) (push) Waiting to run
CI: Master (Build, Test, Lint) / Lint (push) Waiting to run
CI: Master (Build, Test, Lint) / Performance (push) Waiting to run
CI: Master (Build, Test, Lint) / Notify Slack on failure (push) Blocked by required conditions
Util: Sync API Docs / sync-public-api (push) Waiting to run
perf(ai-builder): Defer heavy idle-boot dependencies (-27 MiB heap) (#30834)
2026-05-21 09:28:39 +00:00
..
docs feat(core): Curate workflow examples for the builder sandbox (#30025) 2026-05-13 06:45:39 +00:00
examples feat(core): Curate workflow examples for the builder sandbox (#30025) 2026-05-13 06:45:39 +00:00
scripts feat(core): Curate workflow examples for the builder sandbox (#30025) 2026-05-13 06:45:39 +00:00
src perf(ai-builder): Defer heavy idle-boot dependencies (-27 MiB heap) (#30834) 2026-05-21 09:28:39 +00:00
test-fixtures feat(core): Accept merge.input(n) inside ifElse/switch branch targets in workflow-sdk (#29716) 2026-05-07 07:46:06 +00:00
.gitignore feat(core): Curate workflow examples for the builder sandbox (#30025) 2026-05-13 06:45:39 +00:00
eslint.config.mjs perf(ai-builder): Defer heavy idle-boot dependencies (-27 MiB heap) (#30834) 2026-05-21 09:28:39 +00:00
jest.config.js feat(core): Curate workflow examples for the builder sandbox (#30025) 2026-05-13 06:45:39 +00:00
package.json 🚀 Release 2.22.0 (#30713) 2026-05-19 11:36:59 +00:00
README.md feat(ai-builder): Add code-base workflow builder (#24535) 2026-02-10 12:24:27 +00:00
tsconfig.build.json feat(ai-builder): Add code-base workflow builder (#24535) 2026-02-10 12:24:27 +00:00
tsconfig.json chore: Prepare tsconfigs for tsgo (#29230) 2026-04-27 12:30:22 +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