Voice-agent workflow patch
A Python toolchain for a live n8n voice-agent platform: it swept all 676 workflows through the API and shipped a tested 7-edit change to a production booking workflow.
Data paths and guards
- Voice agents: Voice assistants on each brand’s phone numbers that hand calls to the booking workflows.
- HubSpot: Contacts and deals the booking workflows write.
- Booking workflows: Per-brand n8n workflows behind the voice agents.
- OpenAI models: Language models the booking workflows call.
- Patch toolchain: Sweep, dry-run patcher, rollback and in-engine tests, run locally against the n8n API.
- Snapshot and backups: Every workflow as read live, and a copy of each one before it changes.
- From Voice agents to Booking workflows: Calls to book. The caller’s details and the appointment asked for. A call a voice agent takes.
- From Booking workflows to OpenAI models: Model calls. Chat model requests from the agent nodes. Each call the agents take.
- From Booking workflows to HubSpot: Contacts and bookings. Contacts, deals and booking results. A booked appointment.
- From Booking workflows to Patch toolchain: Every workflow, read live. All 676 workflows, read live through the n8n API, page by page. Before any change.
- From Patch toolchain to Snapshot and backups: Snapshot, pre-edit copies. The live snapshot, and a copy of each workflow before it changes. Each pull and each change.
- From Patch toolchain to Booking workflows: 7 edits, after a dry run. The changed expression, with the prior version recorded for rollback. A clean dry run with no drift.
- On Every workflow, read live: Live state, not a backup. Every workflow is read live through the API, page by page, rather than from a backup in git.
- On 7 edits, after a dry run: Dry run, drift abort, marker. The patcher runs dry by default, stops if a workflow changed since it was read, and marks each edit so a rerun cannot apply it twice.
- On 7 edits, after a dry run: Proven in n8n’s engine. The exact expression runs in n8n’s own engine through a throwaway webhook workflow, 6 of 6, beside 21 of 21 logic tests.
- On Snapshot, pre-edit copies: A copy before each change. Each workflow is copied before it changes and its prior version is recorded, so a rollback can push it back.
- On Contacts and bookings: Real names kept. The changed expression takes a caller’s name from the call, keeps a real name already in HubSpot and never writes a stand-in.
- Built by me
- Platforms I connect to
- Guards
- In production
| Calls to book The caller’s details and the appointment asked for |
|---|
| Model calls Chat model requests from the agent nodes |
| Contacts and bookings Contacts, deals and booking results |
| Every workflow, read live All 676 workflows, read live through the n8n API, page by page |
| Snapshot, pre-edit copies The live snapshot, and a copy of each workflow before it changes |
| 7 edits, after a dry run The changed expression, with the prior version recorded for rollback |
-
Systems
Voice agents hand calls to per-brand n8n booking workflows, which call OpenAI models and write contacts and deals into HubSpot. The platform is not my build; the patch toolchain, in Python against the n8n API, is.
-
Data paths
The toolchain read all 676 workflows live through the n8n API, kept a snapshot and a copy of each workflow before it changed, and wrote a 7-edit change back to a production booking workflow after a clean dry run.
- a Calls to book
- b Model calls
- c Contacts and bookings
- d Every workflow, read live
- e Snapshot, pre-edit copies
- f 7 edits, after a dry run
-
Guards
The work read live state, not a backup. The patcher runs dry first, stops on drift and marks each edit. The expression was proven in n8n’s own engine, every workflow was copied first, and a real name is never replaced by a stand-in.
- Live state, not a backup on d
- Dry run, drift abort, marker on f
- Proven in n8n’s engine on f
- A copy before each change on e
- Real names kept on c
-
Result
The change runs in a production booking workflow, proven by 6 of 6 runtime checks inside n8n and 21 of 21 logic tests, with the prior version recorded for rollback.
What I built
- A live pull of every workflow through the n8n API, page by page, into a local snapshot.
- A read-only sweep of every workflow on the instance, to find each node that writes a contact’s name the same way.
- A patcher that runs dry by default, stops if a workflow changed since it was read, marks each edit, and checks the workflow is still published after every update.
- A runtime test: a throwaway webhook workflow runs the exact live expression in n8n’s own engine against mocked upstream nodes, then deletes itself.
- A 7-edit change to a production booking workflow: a caller’s name comes from the call, a real name already in HubSpot is kept, and a stand-in is never written.
What the guards protect against
| The risk | The guard |
|---|---|
| A backup that lags the live instance hides what is really running. | Live state, not a backup Every workflow is read live through the API, page by page, rather than from a backup in git. |
| A change lands on a workflow that changed underneath it, or lands twice. | Dry run, drift abort, marker The patcher runs dry by default, stops if a workflow changed since it was read, and marks each edit so a rerun cannot apply it twice. |
| An expression that passes outside n8n fails inside it. | Proven in n8n’s engine The exact expression runs in n8n’s own engine through a throwaway webhook workflow, 6 of 6, beside 21 of 21 logic tests. |
| A deployed change cannot be undone. | A copy before each change Each workflow is copied before it changes and its prior version is recorded, so a rollback can push it back. |
| A booking writes a stand-in name over a caller’s real name. | Real names kept The changed expression takes a caller’s name from the call, keeps a real name already in HubSpot and never writes a stand-in. |
Results
- A 7-edit change live in a production booking workflow, proven by 6 of 6 runtime checks inside n8n and 21 of 21 logic tests.
- All 676 workflows, 317 of them active, swept read-only before the change.
Facts
- n8n’s API cannot restore a version by id, so a rollback pushes the saved nodes forward as a new version
- Each update sends only the fields n8n’s API accepts, so data pinned for testing is left as it was
Related builds
-
Multi-tenant booking platform
Date: Apr 2026
Fact: 4 live tenants, 21 of 21 production smoke checks on each
Client: For four roofing contractors
Systems: Zuper, Demand IQ and n8n
Status: In production
-
Multi-tenant event processor
Date: Jun 2026
Fact: 10,630 events in 7 days through the queue that replaced Make.com
Client: For a multi-brand roofing company
Systems: AccuLynx and Make.com
Status: In production
-
Business-card lead intake
Date: Feb 2026
Fact: Prototype app in 1 day, then a prompt with 20+ lead-source rules
Client: For a construction company
Systems: Claude
Status: In production