← All writing
Engineering

Declarative workflows over drag-and-drop

Why versioned, code-first automation beats black-box builders for anything mission-critical.

Eigensu Engineering8 min read

Visual workflow builders are excellent at the first version of an automation and increasingly poor at every version after it. That trade is fine for a marketing trigger and genuinely dangerous for anything that moves money, stock or patient records.

What drag-and-drop optimises for

Builders optimise for time-to-first-run by a non-engineer. That is a real and valuable thing, and it explains their popularity honestly. The cost is that the workflow's definition lives in a vendor's database as opaque state rather than in your repository as text.

Everything downstream follows from that one fact. You cannot diff opaque state, so you cannot review it. You cannot review it, so you cannot approve changes. You cannot approve changes, so you cannot roll them back with confidence.

What breaks at 2am

  • Nobody can answer "what changed?" A workflow that worked yesterday fails today, and the only audit trail is a last-modified timestamp and a name.
  • There is no staging copy that is genuinely identical to production, because the copy is made by hand.
  • Error handling is per-node and invisible. Retry counts and dead-letter behaviour are configured in eleven separate dialogs, and nobody has read all eleven.
  • Testing means running it. There is no way to assert on the logic without triggering the side effects.

A declarative definition removes all four at once, because the workflow becomes an ordinary file that ordinary tooling already understands:

invoice-sync.workflow.ts
// Reconcile vendor invoices against the ledger, nightly.export const invoiceSync = workflow({  trigger: schedule("0 2 * * *"),  retries: 3,  onFailure: alert("#ops-oncall"),   run: async ({ step }) => {    const rows    = await step.fetch("erp.invoices", { since: "24h" });    const matched = await step.run("reconcile", () => reconcile(rows, ledger));     await step.commit(matched);    return { synced: matched.length, skipped: rows.length - matched.length };  },});

Nothing here is clever. That is the point. The trigger, the retry policy and the failure route are declared in one place, the business logic is an ordinary function you can unit-test without a network, and the whole thing is forty lines that a reviewer can hold in their head.

Diffs, reviews and rollbacks come free

Once the definition is text, your existing engineering process applies to it without modification. A change to the retry policy shows up in a pull request. It gets reviewed by someone who understands the consequences. It deploys through the same pipeline as everything else, and it reverts with a single command at 2am when the person who has to fix it is not the person who wrote it.

The value is not that code is more powerful than a canvas. It is that a diff is more powerful than a memory.

When a builder is genuinely the right answer

We are not absolutists about this. A visual builder is the correct choice when all of the following hold:

  • The workflow is owned and edited by a non-engineering team, and will stay that way.
  • A silent failure costs an opportunity rather than money, data integrity or compliance standing.
  • The logic fits on one screen and is expected to stay there.

Marketing sequences, internal notifications and lead routing all pass that test comfortably. Invoice reconciliation, inventory movements, approval chains and anything touching a regulated record do not. The moment a builder-based workflow becomes load-bearing, the migration is far more expensive than starting it in code would have been.

Written by
Eigensu Engineering
← Back to all writing
Get started

Rather have us fix it than read about it?

Tell us which process is eating the most hours. We'll map it, scope it, and show you what the automated version looks like.