Track AI agent token costs and store receipts with the n8n API and Data Tables
Ever wondered how much your AI Agent is costing you per run? I had no idea. You build an agent, it works great, but behind the scenes tokens are burning. And you just see the API-key cost as an aggregated value on Str...
Template notes
Ever wondered how much your AI Agent is costing you per run?
I had no idea. You build an agent, it works great, but behind the scenes tokens are burning. And you just see the API-key cost as an aggregated value on Stripe, right?
One workflow costs you $0.002. Another one quietly racks up $2.00 every time it fires. Without tracking, you're flying blind.
This workflow fixes that.
Who is this for
Anyone running AI agents in n8n who wants to know what they actually cost before the bill surprises you.
What it does
Every hour, it scans all your tagged (triggers on worklow TAGS) AI agent workflows and extracts the exact token usage per model, calculates the estimated cost in USD, and stores a receipt in an DataTable.