Nodemaker: Auto-generate n8n nodes
Nodemaker - Automatic node generator for n8n

Nodemaker: Auto-generate n8n nodes

Our team's capstone project for the MLH Fellowship is Nodemaker, an app to automatically generate nodes for n8n, a Zapier-style workflow automation tool.

Nodemaker is motivated by the need to streamline all the steps in the nodemaking process: node functionality files, node docs files, package.json listing, icons and screenshots, placement of files in the official repos, and workflow submission at n8n.io.

No alt text provided for this image

Developed as a desktop app and CLI utility, with TypeScript, Node, Electron and Vue.

By automating this process, Nodemaker frees developers from the work of writing structural code for nodes—especially for various endpoints and request methods—, writing docs for the nodes and generating images for the docs, updating the package.json listing, fixing node formatting issues—parameter casing, trailing commas, staggered lines—and enforcing code style guidelines, finding a relevant and properly sized node icon, placing all output files in the official repos, and uploading a sample workflow to the n8n collection. In turn, Nodemaker also frees maintainers from the work of reviewing to ensure that pull requests made by the community conform to the official n8n standards.

Desktop & CLI

Nodemaker's desktop UI offers a wizard-like workflow, for the user to fill in node params in stages, with a design style closely resembling that of n8n.

Nodemaker desktop app screencap

Nodemaker can also be operated as a CLI utility, with input params inside a TypeScript file. All scripts are fully documented in the Nodemaker's CLI Reference.

No alt text provided for this image

Output files

Nodemaker generates six types of node functionality files:

  • *.node.ts — main logic (regular or trigger node)
  • GenericFunctions.ts — node helper functions
  • *Description.ts — separate logic per resource (optional)
  • *.credentials.ts — node authentication params
  • package.json — updated node listing
  • *.png — node icon
No alt text provided for this image

Nodemaker also generates three types of node documentation files:

  • README.md — main doc file
  • README.md — credentials doc file
  • workflow.png — in-app screenshot for main doc file
No alt text provided for this image

Finally, once these files are generated, Nodemaker can:

  • auto-place them in forks of the n8n and n8n-docs repos, and
  • auto-submit a sample workflow to the n8n.io collection.
No alt text provided for this image

Functionality

Backend

Nodemaker's backend is a TypeScript/Node app uses generators and services.

1. Every CLI command transpiles TypeScript into JavaScript and calls the transpiled version.

2. Each command executes a short script in the /scripts directory, which:

  • gathers the required parameters (if any),
  • instantiates the the required generator or service, and
  • runs checks and executes the relevant methods.

3. The successful or failed result of the backend operation is simply logged out.

All generators rely on hygen library to combine parameters and templates to generate output files in TypeScript, Markdown or JSON. In turn, major operations that do not involve generation with hygen are those in the /services directory.

No alt text provided for this image

Frontend

The Nodemaker's frontend is an Electron/Vue app in /client. It uses channels for communication between the frontend's renderer process (Vue app in main.ts) and its main process (Electron app in background.ts).

Firstly, the command npm run desktop starts up the Electron app in client/src/background.ts, which serves the Vue app rooted in main.ts and self-registers all the inter-process communication channels in client/channels.

No alt text provided for this image
No alt text provided for this image

Authors

Iván Ovejero & Erin McNulty — MLH Fellowship

Acknowledgments

Thanks to our mentor Ian Jennings, n8n maintainers Jan Oberhauser, Ricardo Espinoza and Tanay Pant as well as the n8n community for their valuable feedback.

Justin Turpin

Rogue MindHacker Turned Copywriter

4 年

This is exciting news :)

回复

Guys, this is awesome! One of the things I didn't know I want until I saw it. Thank you so much for sharing.

Kunal Kushwaha

Field CTO at Civo. Founder at WeMakeDevs.

4 年

Great work!

回复

要查看或添加评论,请登录

社区洞察

其他会员也浏览了