← all case studies
Case study

Node Development Pipeline: integrations that build, test and repair themselves

n8n is a workflow-automation platform, and a "node" is the piece of software that connects it to another service. Writing one by hand takes days. I built a pipeline that takes the name of a service and produces a working, tested integration, fixes its own failed builds, and remembers what it learned for the next one.

Role
Designer and sole engineer
Period
2024 to present, rebuilt December 2026
Status
162 packages on npm, version 4 piloted, catalog rebuild under way
Scope
Workflow, prompts, vector memory, CI, publishing

One service name in, one tested integration out

The pipeline is a single workflow of 95 steps. It reads about the target service, plans the integration, writes the code in parallel pieces, pushes it to GitHub and waits for the automated checks. If the checks fail, it reads the error log, writes a fix and tries again. Nothing is published until the checks pass and I approve it.

Two ideas make it more than a code generator. It has a memory: every build is stored in a vector database, and each new build starts by recalling the most similar past ones. And it repairs itself: a failed build is treated as information, fixed, and written down so later builds avoid the same mistake.

The screens below are the real workflow, a real run and its real output: the Kraken exchange integration, rebuilt in December 2026. Server addresses are hidden in the workflow screens. Nothing else is altered.

95
steps in the build workflow
162
packages published to npm
8 min
to generate the pilot integration
166
tests passing on the pilot
2
failures the pipeline repaired itself
5
past builds recalled before each new one

The workflow: 95 steps on one canvas

Built in n8n, the same platform the integrations are for

Each box is one step: a call to an AI model, a piece of code that checks or reshapes the result, or a request to GitHub, the project database or the vector store. Click any screen to enlarge it.

velobpa.app.n8n.cloud
The whole workflow on the n8n canvas: three triggers on the left, one long row of about thirty steps, then several branching rows on the right ending in a loop.
The whole pipelineLeft to right: three ways to start a build, the long generation row, the branches that push to GitHub and record the build, and the repair loop at the bottom right. The long curved line is the shortcut that runs the repair loop on its own.
velobpa.app.n8n.cloud
Ten steps in a row: Phase 2 Generate Scaffold, Parse Scaffold, Split Resources, Build All Prompts, Phase 3 API Call, Reshape Phase 3, Parse All Operations, Merge Operations, Assemble Node File, Validate Package.
Writing the codeThe plan is split into one job per area of the API, all of them are written at the same time, and code steps stitch the pieces into a single file and validate it. The globe icons are calls to the AI model. The braces are my own code.
velobpa.app.n8n.cloud
A row of steps: Assemble Test File, Build README Prompt, Rate Limit Cooldown, Phase 5 Generate README, Parse README, Extract Build Metadata, Lookup Existing by Service, Override Repo Name from Airtable, then a split to Finalize Memory Record and Auto Detect Mode.
Tests, README and the memory recordA second, cheaper model writes the README. The project database is checked for an existing repository, and the build record is finalized for the vector store.
velobpa.app.n8n.cloud
Branching steps after Route by Mode: an upper path that creates a repository and pushes files in a loop, a lower path that fetches existing files and updates them, and Airtable steps that record the project and create an approval request.
Create or updateA new service gets a new repository. An existing one is updated in place, and files the old version left behind are removed. Both paths end by recording the project and raising an approval request.

Build memory: each build starts from what earlier builds learned

Retrieval-augmented generation, applied to the pipeline's own history

An AI model starts every job knowing nothing about the last one. Left alone, it makes the same mistake on build 100 that it made on build 1. The fix is a memory it can search. A vector database stores text as a list of numbers that captures meaning, so the pipeline can ask for "builds similar to this one" instead of matching exact words.

velobpa.app.n8n.cloud
The start of the workflow: three triggers feed Set Variables, then Generate Query Embedding, Query Qdrant, Inject Memory Context, Build Research Prompt, Phase 1 Research API and Parse Research. A Repair Only branch leaves from below.
Recall happens before anything is writtenThe first four steps of every build: turn the request into a vector, ask the vector database for similar past builds, and inject their lessons into the research prompt. Only then is the AI model called.
  1. Describe the job. The service name, category and description become a 1,536-number vector (Voyage AI).
  2. Recall. The vector database (Qdrant) returns the five most similar past builds above a similarity score of 0.65. A new crypto exchange finds other exchanges.
  3. Inject. Their lessons go into the research prompt: how similar services sign requests, what broke, what had to be repaired.
  4. Store. When the build finishes, its own record goes back in: the lessons about this API, the build time, whether the checks passed, and what each repair taught.

What the pilot build remembered

About the API

Private endpoints need a signed request with a strictly increasing counter. Request bodies are form-encoded, not JSON. The API can return a success status with an error inside it.

About its own build

Checks: green. Repairs: 2. Lesson one: a doubled comma between generated blocks leaves a hole in a list. Lesson two: an error object must carry the API's own message.

One record per repository

A rebuild replaces the old record instead of adding a copy. The first version of the pipeline did not do this, and stored the same two boilerplate lessons on all 223 records.

Self-repair: a failed build is read, fixed and remembered

Up to three repairs per build, each one a small patch

Generated code often has small faults: a stray character, a type the compiler rejects, a test that expects the wrong shape. A person would read the error, change two lines and move on. The repair loop does the same, and asks the model for exact find-and-replace edits instead of a rewritten file, so a fix cannot quietly change code that already worked.

velobpa.app.n8n.cloud
The repair loop on the canvas: Init Repair, Wait for CI, Repair State, Get Head Commit, Get CI Runs, Check CI, then three decisions CI Pending, CI Green and Can Repair. One exit leads to Finalize CI, Update Memory CI and CI Gate. The other leads to Get CI Jobs, Get Job Log, Get Node File, Get Test File, Build Repair Prompt, Phase 6 Repair, Apply Patches, Push Repair and Next Attempt, which loops back.
The repair loopTop left to right: wait for the checks and read the result. If they are still running, loop. If green, record the result in memory and finish. If red, the bottom row fetches the error log and the two source files, asks for a patch, applies it, pushes it and goes around again.
github.com/Velocity-BPA/n8n-nodes-kraken-exchange / commits
The commit history of the Kraken repository on 2 December 2026. The top commit, fix: CI repair attempt 2 (test), has a green tick. The one below, fix: CI repair attempt 1 (build), has a red cross, as do the file updates before it.
Red, red, greenThe pilot repository, newest first. The file updates failed their checks. The first repair fixed a compile error and exposed a failing test. The second repair fixed the test. Both commits were written by the pipeline.
github.com/Velocity-BPA/n8n-nodes-kraken-exchange / actions
The GitHub Actions summary for the run titled fix: CI repair attempt 2 (test), number 18, showing status Success, duration 37 seconds and one passing job, build-test.
The run that passedInstall, compile and 166 of 166 tests, in 37 seconds. The two repairs took about four minutes end to end with nobody watching.

A run: watching a build go through

The slow steps are the AI calls. Everything between them takes milliseconds

velobpa.app.n8n.cloud
The workflow canvas during a live run, with completed steps outlined along the generation row, and a log panel listing Merge Operations, Assemble Node File, Validate Package, Assemble Test File and Build README Prompt, each finished in under 50 milliseconds, and Phase 5 Generate README still running.
Seven and a half minutes inThe code is written, assembled and validated, and the README is being generated. Pushing to GitHub and the repair loop come next.
velobpa.app.n8n.cloud
The n8n executions list for the pipeline on the night of 1 to 2 December 2026: seven runs, four marked Success and three marked Error, with run times from 2.8 seconds to 6 minutes 14 seconds.
The night of the rebuildEvery run is logged, failures included. The errors here are the ones that led to fixes described on this page: an expired credential, a wrong file reference, a log download that was refused.
velobpa.app.n8n.cloud
One step opened in n8n, showing its input: the service name Kraken Exchange, the repository name, and the generated package.json, tsconfig, node file, credentials file, README, gitignore and test file as text fields, beside the JavaScript for the step.
Inside one stepAny step can be opened after a run to see exactly what went in and what came out. Here the whole generated package is passing through: package settings, the integration, its credentials, the README and the tests.

The result: a package anyone can install

Kraken exchange  |  8 resources, 53 operations, 166 tests

What comes out is an ordinary open repository and an ordinary npm package. Everything in these screens was written by the pipeline, apart from the release note.

github.com/Velocity-BPA/n8n-nodes-kraken-exchange
The Kraken exchange repository on GitHub: folders for workflows, credentials, nodes and test, files including LICENSE, README, jest config, package.json and tsconfig, a green tick on the latest commit, and release v1.1.0 marked Latest.
The repositoryOne repository per integration, with the same layout every time: the integration, its credential definition, tests, a license, and two automated checks.
github.com/Velocity-BPA/n8n-nodes-kraken-exchange / nodes
The generated TypeScript source file KrakenExchange.node.ts open on GitHub, 4,893 lines, starting with a license header, imports and the class definition.
The integrationAbout 4,900 lines of TypeScript covering eight areas of the API.
github.com/Velocity-BPA/n8n-nodes-kraken-exchange / test
The generated test file KrakenExchange.node.test.ts open on GitHub, 1,882 lines, showing mocks and the first test cases.
Its tests166 tests, generated with the code and run on every push.
github.com/Velocity-BPA/n8n-nodes-kraken-exchange / .github / workflows
The publish.yml workflow file on GitHub, with steps named Tag must match package.json version, Install, Build, Test, Declared node files exist, and Publish.
The publish gateA release reaches npm only if the tag matches the version, the build passes, the tests pass, and every file the package declares is really there.
github.com/Velocity-BPA/n8n-nodes-kraken-exchange / releases
The v1.1.0 release page on GitHub, marked Latest, with notes listing 8 resources and 53 operations, matching file names, 166 of 166 tests and gated publishing.
The releaseA release is created only after I have reviewed the result. That approval is the one manual step.
npmjs.com / package / @velocity-bpa / n8n-nodes-kraken-exchange
The npm page for @velocity-bpa/n8n-nodes-kraken-exchange at version 1.1.0, showing the generated README with a licensing notice, a description of the eight resources, a feature list, and package details in a side column.
On npmVersion 1.1.0, an hour after release. The README, badges and feature list were written by the pipeline.

The catalog, and what I found when I audited it

162 packages published. Half of them could not load

I built the first version of this pipeline in 2024 and used it to publish 162 packages. When I came back to it in December 2026, I downloaded every one and checked it against what it claimed to contain before rebuilding anything.

github.com/Velocity-BPA
The public repository list on the Velocity-BPA GitHub account filtered to n8n-nodes: 288 results, beginning with 1inch Network, Aave Protocol, Absorb LMS, Acumatica Cloud ERP and Adobe Experience Manager.
The repositories288 public integration repositories on my GitHub account, nearly all generated by the pipeline. 162 of them are published to npm under @velocity-bpa. They cover blockchain and DeFi, fintech, healthcare and enterprise software.

What the audit found

  • 81 of 162 packages could not load. Each package tells n8n where its files are, and in 81 those files were missing. In 77 the cause was the same: the service name had a space in it, so the file was written to one path and declared at another.
  • The tests never ran. The old automated check compiled the code but skipped the tests, so a broken package still got a green tick.
  • The memory held nothing useful. 223 records with two distinct lessons between them.
  • Failures were silent. Steps were set to continue on error, so a run could report success after pushing nothing.

What version 4 changed

Rules in code, not in prompts

File paths, package settings and build configuration are written by ordinary code after the model finishes, so a space in a name cannot break a package again.

Checks that can fail

Every push is built and tested. Publishing is a separate, gated step.

Fail loudly

Database lookups and GitHub pushes now stop the run when they fail.

Respect hand-written work

A guard refuses to overwrite a repository I built by hand unless I force it.

A cap on scope

An uncapped trial covered 21 areas of one API and took 18 minutes. Builds are capped at eight, which brought the pilot to about 8 minutes.

Do not duplicate n8n

Four services in the catalog now have official integrations built into n8n. The rebuild skips them.

So far one package, the Kraken exchange, has been rebuilt and republished through version 4. The rest of the catalog follows, a few at a time, so each build can draw on the lessons of the ones before it.

From a name to a package

  1. Request. A build starts from a web request carrying the service name, a category and a short description.
  2. Recall. The request is embedded and the five most similar past builds are pulled from the vector database.
  3. Research. The model studies the API and returns a plan: how to authenticate and which resources and operations to cover, capped at eight resources.
  4. Write in parallel. Each resource is written by its own call at the same time, then code stitches the pieces into one file.
  5. Normalize. Code enforces file names, package settings, license, build configuration and the automated checks.
  6. Document and remember. A cheaper model writes the README, and the build record is stored.
  7. Push. The files go to GitHub, creating the repository or updating it.
  8. Check and repair. The pipeline waits for the checks and repairs failures, up to three times.
  9. Approve. I review the result and create the release. The gated publish step sends it to npm.

The architecture

Designed it, built it, audited it and rebuilt it

Design

The phase structure, the prompts, the parallel write step and the approval gate.

Memory

Chose the embedding model and vector store, designed the record, and wired recall and storage into every build.

Audit

Downloaded all 162 packages, checked each against its own manifest, and traced every failure to a cause in the pipeline.

Rebuild

Moved the rules that must never break out of prompts and into code, added real checks and the repair loop, and made failures stop the run.

Pilot

Rebuilt the Kraken integration end to end: generated, repaired twice by the pipeline, 166 tests passing, published.

Working with AI

I used Claude as a pair programmer for the audit and the rebuild. The design decisions, the review and the approval of every release are mine.

What is next

  • Rebuild the catalog through version 4, starting with the packages that cannot load.
  • Prevent, then repair. The doubled-comma fault is fixed by the repair loop today. It should be removed in the assembly step so it never reaches the checks.
  • Move to my own infrastructure. A self-hosted n8n with a Postgres database in place of the hosted instance and Airtable.
  • Keyless publishing. Replace stored npm tokens with short-lived credentials issued per release.

Stack

n8n, Claude API (Opus, Sonnet), TypeScript, Node.js, Qdrant, Voyage AI, GitHub Actions, npm, Jest, Airtable