Skip to content

Stackbilt-dev/n8n-transpiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

n8n-transpiler — workflow to Workers

n8n-transpiler

Cloudflare Worker that transpiles n8n workflow JSON into deployable Worker projects. Compiler pipeline wrapped in a Hono API with bearer-token auth.

API

GET /health

Returns service status. No auth required.

POST /transpile

Accepts an n8n workflow and returns scaffold-ready files.

Auth: Bearer token (set TRANSPILER_TOKEN secret).

Request:

{
  "workflow": { "name": "...", "nodes": [...], "connections": {...} }
}

Response:

{
  "files": [
    { "path": "src/index.ts", "content": "..." },
    { "path": "wrangler.toml", "content": "..." },
    { "path": "README.md", "content": "..." },
    { "path": "package.json", "content": "..." },
    { "path": "tsconfig.json", "content": "..." }
  ],
  "summary": {
    "workflowName": "My Workflow",
    "totalNodes": 5,
    "supportedNodes": 4,
    "unsupportedNodes": 1,
    "resources": { "secrets": 1, "databases": 0, "ai": false, "queues": 1, "cronTriggers": 0 }
  },
  "meta": { "durationMs": 12, "inputNodes": 5, "outputFiles": 5 }
}

Setup

npm install
wrangler secret put TRANSPILER_TOKEN
wrangler dev

Deploy

wrangler deploy

Architecture

POST /transpile
  -> WorkflowParser (n8n JSON -> IR)
  -> WorkerGeneratorV2 (IR -> TypeScript + config files)
  -> files[] response

The compiler pipeline supports: webhook triggers, schedule triggers, HTTP requests, conditionals (IF), switch nodes, loops (splitInBatches), data transforms, database queries (Postgres/MySQL via Hyperdrive), AI nodes (Workers AI), and code nodes (stub only).


Built by Stackbilt — Apache-2.0 License

About

n8n workflow → Cloudflare Workers transpiler. Converts n8n automation JSON to deployable edge Workers.

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors