Track LLM costs and usage across OpenAI, Anthropic, Google and more
Ready for 3.0Ready 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 when another workflow calls it. It uses only n8n's built-in nodes.
How it runs
Trigger: When another workflow calls it.
- Extract Execution ID (Edit Fields (Set)): sets 1 field: executionId
- Get Execution Data (n8n): work with credential
- Extract Token Usage (Code): runs custom JavaScript code
- Find Nodes with LLM Data (Code): runs custom JavaScript code
- Standardize Names (Code): runs custom JavaScript code
- Merge: merges the data from its input branches
- All Models Defined? (If): checks a condition and branches into true / false
- Model Prices (Code): runs custom JavaScript code
- Stop and Error (Code): runs custom JavaScript code
- Generate Summary (Code): runs custom JavaScript code
…plus 1 more step. See the full node list below.
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 (6)
- Execute Workflow Trigger
n8n-nodes-base.executeWorkflowTrigger - Code
n8n-nodes-base.code - Edit Fields (Set)
n8n-nodes-base.set - n8n
n8n-nodes-base.n8n - If
n8n-nodes-base.if - Merge
n8n-nodes-base.merge
From the author
Installation Steps 1. Go to Settings → n8n API and create an API key 2. Add it as credential for the Get Execution Data node 3. Review model mappings in Standardize Names node 4. Review pricing in Model Prices node To Monitor a Workflow 1. Add Execute…