Templates / LLM usage tracker & cost monitor with node-level analytics (v2)

LLM usage tracker & cost monitor with node-level analytics (v2)

Ready for 3.0

by Amir Safavi-Naini · 1,724 views · created 2025-08-14 · Engineering, Multimodal AI

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What this workflow does

This workflow has 12 nodes and runs manually, when you click “Execute workflow” (plus 1 other trigger). It uses only n8n's built-in nodes.

How it runs

Trigger: Manually, when you click “Execute workflow” (plus 1 other trigger).

  1. Get an execution (n8n): get (execution)
  2. Find Nodes with LLM Use (Code): runs custom JavaScript code
  3. Merge: merges the data from its input branches
  4. create models_used list (Code): runs custom JavaScript code
  5. Calculate cost (Code): runs custom JavaScript code
  6. Standardize names (Edit Fields (Set)): sets or maps fields
  7. model prices (Edit Fields (Set)): sets or maps fields
  8. Check correctly defined (Code): runs custom JavaScript code
  9. If: checks a condition and branches into true / false
  10. Stop and Error: stops the run with an error

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

Nodes used (8)

From the author

LLM Cost Monitor & Usage Tracker for n8n > v2: Now it can read multiple types of LLM usages. Better dynamic approach for reading model usage. 🎯 What This Workflow Does This workflow provides comprehensive monitoring and cost tracking for all LLM/AI agent…

Excerpt from Amir Safavi-Naini's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.