Workflown8n
LLM cost tracker for n8n executions
Pass in an n8n execution id and get the tokens used and the cost per model for every AI step in that run
Version 1
v1 · First release.20 Jan 2026
What it does
Another workflow calls this one with an execution id, or you run it by hand with a test id. It fetches that execution through the n8n API, finds every node that used a language model, and totals the input and output tokens per model.
It then checks each model it found against two lists you keep in the workflow: a name map and a price list in dollars per million tokens. If a model is missing from either list, it stops with an error that names the missing models. Otherwise it returns the token counts and the input, output and total cost per model and for the whole run, ready to log or send on.
What you need
12 steps · starts on Another workflow