Track LLM Spend in n8n Workflows + Budget Alerts
Track LLM Spend in n8n Workflows + Budget Alerts
Regular price
£47.99
Regular price
£47.99
Sale price
Unit price
/
per
⬇
Instant Digital Download
∞
Unlimited Downloads
★
Lifetime Access in Your Account
Couldn't load pickup availability
🔥
128+ Sold
Popular with n8n builders
âš¡
23 people viewing
High interest right now
✅
9 added today
Fast-moving digital product
Track LLM Spend in n8n Workflows + Budget Alerts
Regular price
£47.99
Regular price
£47.99
Sale price
Unit price
/
per
Track LLM Spend in n8n—and get budget alerts before costs spike
This n8n workflow automatically monitors your recent executions, extracts LLM token usage, estimates per-call USD cost, logs usage in an n8n Data Table, and sends Slack/email/Telegram/custom webhook alerts when spend goes over budget or suddenly spikes.
What this workflow does
- Runs every 15 minutes on a schedule to keep spend tracking near real-time.
- Fetches execution data from the n8n Public API since the last saved checkpoint.
- Extracts LLM usage from AI-related activity, including token usage from chat model sub-nodes and raw provider responses captured from nodes like OpenAI, Anthropic, Google Gemini, and HTTP Request.
- Calculates token totals and estimates cost in USD using configured per-model pricing, including flags for unpriced models.
- Logs only new LLM-call rows into an n8n Data Table using a unique callKey to deduplicate across runs.
-
Analyzes the last 8 days of usage to detect:
- Budget overruns per workflow
- Spend spikes vs the prior 7-day daily average
- Excessive calls per execution (looping behavior)
- Models missing pricing
- Optionally unpublishes over-budget workflows when configured, then routes alerts to Slack, SMTP email, Telegram, or a custom webhook.
Use cases
- Catch LLM cost overruns in production automations before invoices arrive.
- Detect runaway loops that trigger excessive LLM calls inside n8n executions.
- Monitor provider usage across OpenAI/Anthropic/Gemini—especially when prompts or routing logic changes.
Technical details
- Integrates with n8n Public API (via n8n API key + base URL) to read executions (and optionally unpublish workflows).
- Writes to an n8n Data Table with columns such as callKey, execution/workflow metadata, token counts, costUsd, estimated flags, and finishedAt.
- Uses core n8n nodes including if, switch, set, and code, plus Slack for notifications.
