My workflow ran 700 times, always green, and never did the job

I found this on my own instance today, so I am writing it down while it is still embarrassing.

I have a workflow that reads Gmail, filters, runs an AI Agent over an attached document, uploads the file to Drive and appends a row to a Sheet. I built it while following a course and left it running. It fires every 20 to 30 minutes.

I pulled the full execution history through the public API. Snapshot from today, covering the 14 days my retention still holds:

Executions stored 706
Success 700
Error 6
Slowest successful run 864ms
Median successful run 25ms
Successful runs over 1 second zero
The 6 failed runs 2.9s, 3.4s, 12.4s, 12.7s, 20.3s, 41.0s

Look at the gap. Every run that took real time failed. Every run that finished green took milliseconds. There is nothing in between. Not one execution.

That is not a coincidence, it is the whole story. An AI Agent call plus a Drive upload plus a Sheets append cannot happen in 25ms. So the 700 green runs never got there. They hit the If node, went nowhere, and n8n called it a success. The 6 times the workflow actually reached the expensive part, it crashed.

In two weeks that workflow did its job exactly zero times. My dashboard said 0.5% failure rate.

How to check yours

You do not need a tool. You need one number: the floor, meaning the cheapest possible time a complete run could take.

  1. Pull your executions (GET /api/v1/executions) and compute stoppedAt minus startedAt for each.
  2. Split them by status.
  3. Compare your successful runs against the floor.

If none of your successful executions is anywhere near that floor, none of them completed. The status field will not tell you this. The duration will.

The part I got wrong at first, and it matters. I started by guessing the floor. I picked 200ms, which felt safe for anything that talks to the network. With that number my own workflow came back as merely suspicious, because a handful of green runs crossed 200ms.

The floor was already in the data. My 6 failed runs are the only executions that ever reached the expensive part, and the fastest of them took 2976ms. That is what a complete run costs here. Measured against that, green runs above the floor: zero.

So do not guess the floor. If you have failures that got deep into the flow, the fastest one tells you what the flow actually costs. If you have no failures at all, you have no measurement, and that is worth knowing too.

Two things that make this worse than it looks

Your history is being deleted while you are not looking. My execution IDs go up to 6302. Only 706 of them still exist. Roughly 5600 were pruned. If you want to audit a workflow, retention has to be on before the problem happens, not after you suspect it.

Per workflow insights are a paid feature. On self hosted Community, the Insights page tells you to upgrade to see per workflow breakdowns. So the built in way to catch this is the thing most self hosted users do not have.

What this does not prove

Duration shows a run did not reach the expensive part. It does not show that it should have. A filter doing its job correctly also produces fast green runs.

The stronger check is conservation: records in equals records processed plus records rejected, with a reason attached to every rejection. I have not built that yet.

Has anyone here run the duration check across a whole instance? I am curious whether the clean split I got (every slow run failed, every fast run passed) shows up for other people, or whether mine is unusually clean because it is a single trigger firing on a schedule.

1 Like

Yeah, the bimodal split is real. I have seen it on a couple of scheduled Gmail/If pipelines too: successful runs all sit in the tens of milliseconds, and the only executions that take seconds are the ones that actually reached the Agent/Drive/Sheets path and then failed.

Two things I would add on top of using the failed-run floor instead of a guessed one:

  1. The clean split is more common on a single scheduled trigger with a hard If than on webhook or chat flows. On those, a successful run can be 50ms or 40s depending on payload, so duration is a weaker signal and you get more overlap.

  2. Duration tells you this run never reached the expensive nodes. It still will not tell you the other silent-green case, where the Agent node itself stays green after a tool error (Error Trigger never fires). That is a different failure mode from the If-false path you found, and the status field lies about both.

On the conservation check you have not built yet: that is the one I would actually put in production rather than watching duration. After the write, assert records-in = records-written + records-rejected-with-reason, and have each pipeline check in to one shared heartbeats table so a single watcher can catch both “trigger went quiet” and “ran but wrote zero.” I wrote that pattern up here: How do you catch workflows that run fine but do nothing? - #8 by CameronDWills

I have not run the duration check across a whole instance in one go. Per-workflow it has been a useful first pass, then I throw it away once the conservation check exists.

Thanks Cameron, that’s exactly the piece I was missing. I went and read your check-in/heartbeat/expectations pattern on your thread — the “each workflow reports to one shared checkpoint instead of one monitor per workflow” inversion is the part that makes it scale, and I hadn’t thought about needing the observer’s own external heartbeat so the whole thing doesn’t go quiet along with the instance.

And the tool-error-that-never-fires-Error-Trigger case is a good catch too — that one wouldn’t show up in my duration check at all, since the node still reports success. Going to build the conservation check next with your pattern as the shape, instead of reinventing it.

Really nice write-up, 25 ms floor is clean way to catch it. I hit the same thing myself, so this is from experience (I build hosted tool, so I am a bit biased).

One friendly heads-up on conservation check Cameron mentioned, because I tried it and it fooled me too. records-in = processed + rejected only balances if both sides agree what one record is. If the If node drops whole batch before you count records-in, then records-in is already 0, and 0 = 0 + 0 still balances. Same green, one floor down.

What finally worked for me was counting at the edges: how many emails came in from gmail, versus how many rows actually landed in sheets. If those two numbers do not match, something ate the middle, and I do not have to trust any node’s story about itself.

1 Like

The duration floor is a good detector for this fast no-op path, but it only works in one direction. Below the floor means the expensive path didn’t complete. Above it still doesn’t prove that Drive received a file or Sheets received a row. For this workflow, only that new file or row is evidence the job happened.

1 Like

Great methodology — deriving the floor from your own failed runs is much more rigorous than guessing a threshold, and the writeup of where you went wrong first (guessing 200ms) is the most useful part of the post.

One thing worth adding for anyone replicating this: duration alone can get ambiguous right at the boundary — a green run at 180ms isn’t obviously fake or real on its own. Pulling the per-node run data usually resolves it outright. The execution detail (or `resultData.runData` if you’re hitting the API directly) will simply be missing entries for any node the run never reached — that’s a binary signal, not a threshold judgment call, and it survives cases where the expensive step is occasionally cheap (e.g. a cached AI response coming back fast).

Also worth flagging for anyone reading this after the fact rather than before: you said it yourself but it’s easy to skim past — retention prunes on a schedule regardless of whether you’ve noticed a problem yet. You’d already lost ~5600 of your 6302 executions by the time you looked. If a workflow feels even slightly load-bearing, exporting execution history somewhere durable before you suspect anything is the only way to have this kind of analysis available when you actually need it.

1 Like

Ricart is right that it only works downward. Below the floor proves expensive path did not run. Above it proves nothing about whether Drive got the file. Someone in another thread got to the same place from a different angle: only signal that survives the engine being wrong about itself is the destination, not any node’s story about itself.

Vipul, the runData point is the one I will use. Missing entries for nodes the run never reached is binary. A threshold is a judgement call I have to keep tuning, and it breaks the first time the expensive step is cheap.

The retention point made me go and look at my own engine, and mine is worse than yours in a funnier way. I have a cleanup task on an hourly schedule. The body is a TODO, the count is hardcoded to zero, and every hour it logs “cleanup completed: removed 0 expired results” and returns status completed. It has never deleted anything. My execution history survives by accident, and the job that was supposed to prune it is itself a green run that does nothing.

1 Like

I am writing up the deploy bug for dev.to. Your retention point is in it, because it is the only reason I went and read my own cleanup task and found it had never deleted anything. Do you want your name on it, or keep it anonymous?

The bimodal split you found is detectable from execution metadata alone, without reading any workflow’s data, so I turned it into a scheduled check: pull recent executions through the n8n API node, group by workflow, and flag any workflow where 90%+ of successes finish under a floor (default 200 ms) while the runs that took real time failed. It also flags plain error streaks. Hourly, read-only, Slack digest: the Execution Auditor in n8n-automation-portfolio/04-production-hardening-kit at main · tachyurgy/n8n-automation-portfolio · GitHub. Cameron’s “failed-run floor instead of a guessed one” is a better threshold and I would take a PR for it.

Dimitre, did you end up adding the reconciliation check? For the Gmail-to-Sheets path, I’d compare eligible attachment IDs with a separate Sheets readback, keeping legitimate filter exclusions explicit. I’m with Viridis. Our free Delivery Check compares supplied expected records with destination evidence and flags missing, duplicate, mismatched or uncertain results. It doesn’t collect the evidence or judge the AI’s answer quality. Would a small synthetic example of that handoff be useful?

silent workflow successes that do not actually process data are the hardest bugs to track down.

adding assertion nodes that explicitly verify non-empty array lengths before marking execution successful prevents green runs from masking empty payloads.