Skip to product information

n8n LLM Token Cost Tracking w/ API, Data Tables & Slack Alerts

n8n LLM Token Cost Tracking w/ API, Data Tables & Slack Alerts

 (200+Reviews)
Regular price £8.99
Regular price £8.99 Sale price
SAVE Sold out
⬇
Instant Digital Download
∞
Unlimited Downloads
★
Lifetime Access in Your Account
🔥
128+ Sold
Popular with n8n builders
âš¡
23 people viewing
High interest right now
✅
9 added today
Fast-moving digital product
n8n LLM Token Cost Tracking w/ API, Data Tables & Slack Alerts

n8n LLM Token Cost Tracking w/ API, Data Tables & Slack Alerts

Regular price £8.99
Regular price £8.99 Sale price
SAVE Sold out

Track LLM spend automatically in n8n—per token, per workflow, with Slack alerts

This n8n workflow runs every 15 minutes to pull recent executions from the n8n API, calculate per-call LLM token costs, store them in an n8n Data Table, and notify your team in Slack when any workflow exceeds its daily budget (optionally deactivating it).

What this workflow does

  • Scheduled monitoring: Executes on a 15-minute schedule.
  • Fetches execution data via API: Retrieves the latest active-workflow executions (including execution details) from the n8n API.
  • Extracts LLM calls and calculates costs: Reads each chat model call from the execution run data, obtains token usage (or estimates where stored token usage is unavailable), matches the model to a configured price list, and computes USD cost per call.
  • Prevents duplicate logging: Checks an n8n Data Table to skip LLM calls already logged, then inserts only new usage rows.
  • Enforces daily budget limits: Totals today’s rows per workflow, identifies workflows that exceed their configured dailyBudgetUsd, and ensures only one alert per workflow per day.
  • Optional safety action: Can deactivate over-budget workflows via the n8n API, then sends a budget-overrun message to Slack.

Use cases

  • SaaS operators needing LLM token cost tracking to prevent runaway spending from automation.
  • Automation engineers wanting visibility into which n8n workflows drive the most tokens and cost.
  • Teams that want real-time governance: Slack alerts and optional auto-deactivation when daily budgets are exceeded.

Technical details

  • Integrations / nodes: if, set, code, n8n, Slack, Data Table
  • Data storage: An n8n Data Table with columns such as callKey, workflowId, token counts, costUsd, and finishedAt.
  • Configuration: Set pricesPer1M, dailyBudgetUsd, and budget overrun behavior; connect Slack credentials and target channel.
View full details