---
title: n8n Workflow Builder for Claude Code and Codex | Torke
url: https://torke.tech/resources/n8n-workflow-builder
description: Let an AI agent build n8n workflows that are checked against your own n8n before anything is sent. Free, MIT licensed, runs on your machine.
---

# Build n8n workflows with an AI agent

Torke Workflow Builder is a free command line tool that sits between an AI coding agent such as Claude Code or Codex and your own n8n. You describe the workflow in plain words, the agent writes it, and the tool checks every node, parameter and connection against the n8n you run before anything is sent.

Diagram: An n8n workflow checked node by node

Three connected workflow nodes, each ticked by a rule in turn, and a panel at the bottom where a person releases the workflow once it has passed a test run.

## What is Torke Workflow Builder?

Torke Workflow Builder is a command line tool, twb, that an AI agent uses to create, change, test and publish n8n workflows through the n8n API. It reads the node definitions installed in your own n8n, so a node type, version, parameter or option value that does not exist there is refused before it reaches n8n. Each workflow is created unpublished and read back after every write, and it goes live only after a successful test run.

## Why does an AI agent need checks to build n8n workflows?

An agent that writes n8n workflow JSON from memory gets most of it right, and the misses are quiet. It picks a node type that was renamed, a parameter from an older version of the node, an option value the node never had, or an expression that still points at a node it renamed two edits earlier. n8n often stores the file anyway, and the error shows up the first time the workflow runs, sometimes on a schedule nobody is watching.

Every one of those questions has a written answer inside your n8n installation, so the tool looks the answer up instead of asking the model. The agent keeps the part with no written rule, turning your description into steps and drafting each node, and whatever it drafts passes through the same checks on every run.

**Every node checked against your own n8n**

The catalog comes from the node definitions installed in your instance, 566 node types on n8n 2.40.7, so a node, version, parameter or option your n8n does not have is refused with the closest real names.

**Your edits never overwritten**

The tool keeps a hash of its last write to each workflow. When someone changed the workflow in the editor since then, an update is refused until the agent has pulled and merged that change, and every update keeps a backup of the version before it.

**Nothing goes live untested**

Publishing needs a successful run that started after the last change. A workflow the tool did not create cannot be changed or published until you adopt it, and there is no delete command at all.

## Who does what when a workflow is built

Each step sits with whoever gets it wrong least often. The agent rules in the download write the same split down for the agent.

### Code

Looks up node types, versions, parameters and options, validates the graph and the expressions, rejects secrets, compares every read-back, guards against drift and runs the test gate, with the same input always giving the same answer.

### The agent

Turns your description into steps, chooses nodes from the catalog, drafts their parameters and reads each failed run to propose a fix, which then passes the same checks.

### You

Approve the steps before anything is written, attach credentials in the n8n editor, run the first test and decide when the workflow is published.

## How a workflow gets from your description to n8n

This is the loop the agent follows, as it is written in the agent rules that come with the tool.

**You describe it, the agent proposes steps**

One decision per step in plain words. Plain nodes take every step with a written rule, such as a filter, a date or a sum, and an AI node only takes judgment on free text. Nothing is written before you agree.

**The agent looks up every node**

twb catalog show returns the latest version of each node in your n8n, its exact parameter names and the values each option accepts.

**The file is validated, offline**

twb validate checks node types, versions, parameters, options, connections, expression references, settings and secrets, and names each error with a fix. Nothing is sent while a single error remains.

**The workflow is created unpublished**

twb create sends it, reads it back and compares the two, then gives you the editor link and the credentials to attach.

**You run it once, the agent reads the result**

twb runs shows each node's status, item counts and error message, and the agent fixes and updates the same file until the run is clean.

**It goes live when you say so**

twb publish checks for a successful run after the last change, then publishes. twb unpublish turns it off again.

## Get Torke Workflow Builder

It's free under the MIT licence. We email you a private download link, a zip of plain files that needs nothing but Node.js 20.

## What the download holds

- The twb command line, with no dependencies beyond Node.js 20 or later
- A catalog builder that reads your n8n from an npm install, a Docker container on the same machine, or a container on a server over SSH
- The validator, the read-back comparison, the drift and ownership ledger, backups and the test gate on publishing
- An SSH tunnel per command, so a server's n8n never needs a public port, and API keys read from an environment variable or the macOS Keychain
- AGENT_RULES.md with the build loop, plus CLAUDE.md and AGENTS.md so Claude Code and Codex read it first
- An example configuration for three kinds of setup, 17 unit tests that run without n8n, and the end-to-end test with its instructions

## Who the Workflow Builder is for

For the marketing engineer, growth engineer or operations lead who runs their own n8n, already works with Claude Code, Codex or Cursor, and wants the agent to build and fix workflows on the real instance with every change checked and nothing published without a test.

### Who it's not for

If you run n8n Cloud, the tool can't build its catalog, because that needs the files of the installation. It also won't suit you if you want workflows published without review, or if nobody on the team is comfortable running commands in a terminal.

## Questions about Torke Workflow Builder

### Is Torke Workflow Builder free?

Yes. The code is published under the MIT licence, so you can use and change it for your own n8n or your clients'. We ask for an email address to send the private download link.

### Does it send any data to Torke?

No. It runs on your machine and talks only to the n8n instances you configure, through their API and, when you choose a server or Docker source, through SSH and Docker on your own machines. No usage data, workflow or credential reaches us.

### Which AI agents does it work with?

Any agent that reads files and runs commands in a folder, including Claude Code, Codex and Cursor. AGENT_RULES.md holds the rules they follow, and the CLAUDE.md and AGENTS.md files point Claude Code and Codex to it.

### Which versions of n8n does it support?

It was tested on n8n 2.40.7, self-hosted, both from an npm install and in Docker over SSH. On n8n 1.x publishing falls back to the older activate endpoint, which we have not tested. n8n Cloud is not supported, because the catalog is read from the installed files.

### Does it touch my existing workflows?

Only the ones you hand to it. The tool can list and read every workflow, but it changes or publishes only the workflows it created or the ones you adopt by id, and it cannot delete anything.

### How was it tested?

17 unit tests check the validator against a catalog cut from n8n 2.40.7, and 22 end-to-end checks ran against a disposable n8n: a refused invented node with nothing sent, a refused secret, a create with read-back, the test gate, a live webhook answering, drift caught and backed up, and a workflow the tool did not create left untouched. None of that ran on your instance, which is why the first steps in the README are running the tests and a doctor check.

## More free tools

Calculators, worksheets and code for the rest of the team.

[See every free tool and guide](https://torke.tech/resources)

### You run every first sales call yourself

List last month's first calls, test each against five written facts and see how many of your hours went to accounts that could buy. You finish with one line for your next board meeting.

[Open the first-call audit](https://torke.tech/resources/first-call-audit)

### You own a target on a long sales cycle

Work back from the revenue target and the close date to the accepted leads you need each month, and the last date a new lead can still close this period.

[Open the pipeline calculator](https://torke.tech/resources/pipeline-coverage-calculator)

### You are the only marketer and the list is short

Check whether LinkedIn ads can serve your named account list, what a month of reach costs at your CPM, and what to report to your founder in place of a lead count.

[Open the audience arithmetic](https://torke.tech/resources/linkedin-ads-small-audience-calculator)

## Terms of use and privacy

The two texts that apply to the tool and to this form, in full.

### Terms of use

**What you receive**

A folder of source code, configuration examples and written procedures. The code is published under the MIT licence, so you may use, change and share it, including for clients, as long as the licence notice stays with it.

**What the tool does**

It runs on your machines and talks only to the n8n instances you configure, through their API and, when you choose an SSH or Docker source, through SSH and Docker on your own machines. It sends nothing to Torke.

**Your responsibilities**

Use it only on n8n instances you own or may change. Keep API keys in the environment or your system's secret store, never in a workflow file. Review what a workflow does before you publish it, and test on a disposable instance before you point an agent at one that runs real work.

**No warranty, no promised results**

The tool is provided as it is, without warranty of any kind, as the MIT licence states. To the extent Swiss law allows, Torke is not liable for losses arising from its use or from workflows built or changed with it.

**Changes and law**

Torke may update these terms for later versions, and the version you received stays covered by the terms sent with it, in TERMS.md. Swiss law applies. Version of 25 October 2026.

### Privacy notice for this form

**Who is responsible**

Vincent Quero, trading as Torke, Zurich, Switzerland, reachable at [vincent@torke.tech](mailto:vincent@torke.tech).

**What we store**

Your email address, your first name if you give it, the boxes you ticked and the version of their wording, the time of the request, the pages you read on torke.tech before asking and how you arrived (search, a link, a campaign tag), and how often the download link is used. Like every visit to torke.tech, those page views are recorded with your IP address, browser and approximate location, and the IP address is deleted after 90 days.

**Why, and on what basis**

To send the tool you asked for, which is the reason you gave us the data (GDPR Art. 6(1)(b), and the Swiss Federal Act on Data Protection). If you tick the second box, to send Torke's notes at most once a month, on the basis of that consent (GDPR Art. 6(1)(a)), which you can withdraw at any time without affecting what was sent before.

**Where it is kept, and for how long**

In a Cloudflare D1 database in the EU jurisdiction, deleted automatically 395 days after the request. Emails are sent through Infomaniak in Switzerland. Cloudflare and Infomaniak process the data on our behalf. Nobody else receives it, and it is never sold.

**Your rights**

You can ask to see, correct, delete or receive a copy of your data, restrict or object to its use, and withdraw consent, by writing to [vincent@torke.tech](mailto:vincent@torke.tech), and we answer within one month, as the GDPR requires. You can also complain to the Swiss Federal Data Protection and Information Commissioner or to the data protection authority where you live.

**Measurement**

Google Analytics loads only if you say yes in the visit panel at the bottom of the page. No decision about you is made automatically.
