{"id":31045628,"url":"https://github.com/vahor/n8n-kit","last_synced_at":"2026-02-24T11:12:27.926Z","repository":{"id":310565333,"uuid":"1040362485","full_name":"Vahor/n8n-kit","owner":"Vahor","description":"Generate and deploy n8n workflows using code.","archived":false,"fork":false,"pushed_at":"2025-09-09T10:14:09.000Z","size":3595,"stargazers_count":8,"open_issues_count":7,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-11T05:58:54.774Z","etag":null,"topics":["automation","cli","deployment","iac","n8n","typescript","workflow"],"latest_commit_sha":null,"homepage":"https://vahor.github.io/n8n-kit/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Vahor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["vahor"]}},"created_at":"2025-08-18T21:29:52.000Z","updated_at":"2025-09-09T13:16:44.000Z","dependencies_parsed_at":"2025-08-19T18:39:37.979Z","dependency_job_id":null,"html_url":"https://github.com/Vahor/n8n-kit","commit_stats":null,"previous_names":["vahor/n8n-builder","vahor/n8n-kit"],"tags_count":32,"template":false,"template_full_name":null,"purl":"pkg:github/Vahor/n8n-kit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vahor%2Fn8n-kit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vahor%2Fn8n-kit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vahor%2Fn8n-kit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vahor%2Fn8n-kit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Vahor","download_url":"https://codeload.github.com/Vahor/n8n-kit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vahor%2Fn8n-kit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275136762,"owners_count":25411709,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-14T02:00:10.474Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","cli","deployment","iac","n8n","typescript","workflow"],"created_at":"2025-09-14T17:07:52.989Z","updated_at":"2026-02-11T22:24:06.125Z","avatar_url":"https://github.com/Vahor.png","language":"TypeScript","funding_links":["https://github.com/sponsors/vahor"],"categories":[],"sub_categories":[],"readme":"# n8n-kit\n\n[![Code quality](https://github.com/vahor/typed-es/actions/workflows/quality.yml/badge.svg)](https://github.com/vahor/n8n-kit/actions/workflows/quality.yml)\n[![npm downloads](https://img.shields.io/npm/dm/%40vahor%2Fn8n-kit)](https://www.npmjs.com/package/@vahor/n8n-kit)\n[![n8n](https://img.shields.io/badge/dynamic/json?url=https://raw.githubusercontent.com/Vahor/n8n-kit/refs/heads/main/packages/n8n-kit/package.json\u0026query=$.devDependencies%5B%22n8n-core%22%5D\u0026logo=n8n\u0026label=n8n\u0026labelColor=white)](https://n8n.io)\n\n\u003e [!WARNING]  \n\u003e This project is currently in alpha stage. APIs may change and some features are still under development.\\\n\u003e If you use this package, pin the version to a specific version in your `package.json` file.\n\nBuild n8n workflows using TypeScript code and deploy them using the CLI.\n\n**This is not an official n8n package.**\n\n**Packages**:\n- [**n8n-kit**](./packages/n8n-kit/README.md) - Core library for building workflows\n- [**n8n-kit-cli**](./packages/n8n-cli/README.md) - Command-line interface\n\n```sh\nnpm install @vahor/n8n-kit @vahor/n8n-kit-cli\n```\n\n\u003e [!NOTE]\n\u003e The n8n version shown in the badge indicates the version this library was built against. Most nodes will work with lower n8n versions, but some newer nodes might not be available. For best compatibility, we recommend using the indicated n8n version or using a previous version of this library if you're on an older n8n version.\n\n### Example\n\nFind more examples in the [examples folder](https://github.com/Vahor/n8n-kit/tree/main/examples)\n\n![Example workflow](https://github.com/Vahor/n8n-kit/blob/main/examples/nasa/output.png?raw=true)\n\n```ts\nconst app = new App();\n\nconst nasaCredentials = Credentials.byId({\n\tname: \"nasaApi\",\n\tid: \"credential-id\",\n});\n\nnew Workflow(app, \"my-workflow\", {\n\tactive: true,\n\tname: \"NASA Example\",\n\tdefinition: [\n\t\tnew StickyNote(\"note\", {\n\t\t\tposition: [0, 0],\n\t\t\tparameters: {\n\t\t\t\tcontent:\n\t\t\t\t\t\"## Setup required\\n\\nYou need to create a NASA account and create credentials, and create a bin with Postbin and enter the ID - see [the documentation](https://docs.n8n.io/try-it-out/longer-introduction/)\",\n\t\t\t\theight: 120,\n\t\t\t\twidth: 600,\n\t\t\t},\n\t\t}),\n\n\t\tChain.start(\n\t\t\tnew ScheduleTrigger(\"schedule-trigger\", {\n\t\t\t\tlabel: \"Schedule trigger\",\n\t\t\t\tparameters: {\n\t\t\t\t\trule: {\n\t\t\t\t\t\tinterval: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tfield: \"weeks\",\n\t\t\t\t\t\t\t\ttriggerAtDay: [1],\n\t\t\t\t\t\t\t\ttriggerAtHour: 9,\n\t\t\t\t\t\t\t\tweeksInterval: 1,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t}),\n\t\t)\n\t\t\t.next(\n\t\t\t\tnew Nasa(\"nasa\", {\n\t\t\t\t\tnasaApiCredentials: nasaCredentials,\n\t\t\t\t\tparameters: {\n\t\t\t\t\t\tresource: \"donkiSolarFlare\",\n\t\t\t\t\t\tadditionalFields: {\n\t\t\t\t\t\t\tstartDate: expr`{{ $today.minus(1, 'day') }}`,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t)\n\t\t\t.next(({ $ }) =\u003e\n\t\t\t\tnew If(\"if\", {\n\t\t\t\t\tparameters: {\n\t\t\t\t\t\tconditions: {\n\t\t\t\t\t\t\tcombinator: \"and\",\n\t\t\t\t\t\t\tconditions: [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\toperator: {\n\t\t\t\t\t\t\t\t\t\ttype: \"string\",\n\t\t\t\t\t\t\t\t\t\toperation: \"contains\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tleftValue: $(\"json.classType\"),\n\t\t\t\t\t\t\t\t\trightValue: \"C\",\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t\t\t\t.true(\n\t\t\t\t\t\tnew PostBin(\"PostBin(true)\", {\n\t\t\t\t\t\t\tparameters: {\n\t\t\t\t\t\t\t\tresource: \"request\",\n\t\t\t\t\t\t\t\tbinId: \"1741914338605-0907339996192\",\n\t\t\t\t\t\t\t\tbinContent: expr`There was a solar flare of class ${$(\"json.classType\")}`,\n\t\t\t\t\t\t\t\toperation: \"send\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}),\n\t\t\t\t\t)\n\t\t\t\t\t.false(\n\t\t\t\t\t\tnew PostBin(\"PostBin(false)\", {\n\t\t\t\t\t\t\tparameters: {\n\t\t\t\t\t\t\t\tresource: \"request\",\n\t\t\t\t\t\t\t\tbinId: \"1741914338605-0907339996192\",\n\t\t\t\t\t\t\t\tbinContent: expr`There was a solar flare of class ${$(\"json.classType\")}`,\n\t\t\t\t\t\t\t\toperation: \"send\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}),\n\t\t\t\t\t),\n\t\t\t),\n\t],\n});\n\nexport { app };\n```\n\n## Limitations\n\n- **Generated Graph Layout**: \n\t- No mid-graph direction changes.\n  - No way to set node execution priority (n8n runs nodes top-to-bottom)\n  - **Workaround**: Deploy the workflow once, then edit the workflow in n8n. With the `--merge` option, node positions won't be overwritten.\n- **Credentials**: Must be defined in n8n first, then referenced via `Credentials.byId()` (no API endpoint available)\n- **Folders**: The cli will deploy workflow to the root folder. You can still organize them manually once deployed. (no API endpoint available)\n\nHave ideas for improvements? [Open an issue](https://github.com/Vahor/n8n-kit/issues) or [Suggest a Pull Request](https://github.com/Vahor/n8n-kit/blob/main/CONTRIBUTING.md)\n\n## License\n\nMIT\n\n## Credits\n\nn8n nodes are automatically generated based on the code of the official [n8n node repository](https://github.com/n8n-io/n8n).\\\nWorkflows chaining is inspired by [aws-cdk-lib](https://github.com/aws/aws-cdk/tree/main/packages/aws-cdk-lib/aws-stepfunctions) stepfunctions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvahor%2Fn8n-kit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvahor%2Fn8n-kit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvahor%2Fn8n-kit/lists"}