Build n8n nodes from OpenAPI specs and custom API mappings
by Iván Ovejero
Installation • Operation • Custom Spec Syntax
Warning
This project is deprecated and no longer maintained. Please refer to n8n-nodewriter instead.
Nodebuilder is a utility to generate n8n node files from
Developed to automate the node creation process for:
*.node.ts, logic for a regular node,GenericFunctions.ts, helper functions, and*Description.ts, parameter descriptions.
$ git clone https://github.com/ivov/nodebuilder.git
$ cd nodebuilder && npm i- Place the input file in
src/input/openApi/ - Run
npm run generate - Inspect
src/output/
Notes:
- OpenAPI parsing may fail at undetected edge cases. If your spec cannot be parsed, please open an issue.
- OpenAPI parsing needs to be adjusted to respect n8n's resources-and-operations format. Work in progress.
- Write a YAML file in
src/input/custom/ - Run
npm run generate - Inspect
src/output/
For a full description of how to describe an API in YAML, refer to this explanation.
For a full example of an API description in YAML, refer to copper.yaml.
Run npm run place to place the output files in:
- an n8n clone dir (located alongside the nodebuilder dir), or
- the default custom nodes dir at
~/.n8n/custom.
OpenAPI:
- Add intermediate step to structure the result.
- Add support for more content types.
YAML:
- Add support for
multiOptions
Generator:
- Add resource loaders to the TypeScript generator.
- Generate
*.credentials.ts
Extras:
- Implement testing with
git.js - Explore integration with VSCode YAML
© 2021 Iván Ovejero
Distributed under the MIT License. See LICENSE.md.