Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

automation-diagnostics

Small, single-purpose tools for the failures that automation platforms don't warn you about — the ones where the workflow runs green and the problem shows up in the bill, in the data, or three months later.

Each tool is one file, standard library only, and runs without installing anything.

Tools

Estimates what an AI node inside a loop will cost before you run it.

When an AI node sits inside Loop Over Items (n8n) or an Iterator (Make), the static instruction block is re-sent on every iteration. On a typical classification prompt the instructions are 90%+ of every call and the data you actually care about is a rounding error in the bill.

python3 loop-token-cost/loop_cost.py loop-token-cost/example-prompt.txt --items 400

It reports the static/data ratio, prices a per-item loop against a batched one, and checks whether prompt caching can apply — which is the part most cost estimates get wrong, because below the minimum cacheable prefix length caching is skipped silently, with no error and cache_creation_input_tokens at 0.

Catches a workflow that silently went inactive.

n8n Cloud deactivates a workflow after a hard crash — an OOM kill, for instance. That stops a crash loop, but it is quiet: the workflow stops collecting, nothing errors, and the Error Workflow never fires because the process died before it could. You find out hours later, from missing data.

python3 n8n-watchdog/watchdog.py snapshot   # record what should be active
python3 n8n-watchdog/watchdog.py check      # exit 1 if something dropped off

Exit code is the interface, so cron plus whatever alerting you already have is the whole setup. It reports rather than repairs — there is no auto-reactivate, because turning an out-of-memory workflow back on just runs it into the same limit again.

An n8n workflow that collects a full dataset from an API that repeats cursors, drifts field types, times out and 500s — plus a mock API that does all four on purpose, deterministically, so a bad run can be replayed instead of described.

Three consecutive runs collected all 37 records, dropping exactly the five duplicates that resuming costs, without delivering any record twice.

It also documents the trap it fell into first: $getWorkflowStaticData() is discarded on manual executions and only persists for production runs of an active workflow. The checkpoint appears to work, the summary reports it advancing, and the database stays empty.

Why these exist

Most automation tooling tells you when something threw an error. The failures that cost real money are the quiet ones: a loop that bills 10x what you budgeted, a cache that never engages, a re-run that duplicates records instead of resuming. These are checks for that category.

How this is built

I use AI assistance to write these tools and review the output before it ships. Deciding which silent failure is worth a tool, and what the caveats are, is the part that isn't automated.

License

MIT — see LICENSE.

About

Single-file diagnostics for automation failures that run green — cost, caching, and silent data problems in n8n and Make workflows

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages