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.
Anyone running AI agents in n8n who wants to know what they actually cost before the bill surprises you.
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.
execution_receipts with columns: workflowid (text), executionid (text), receipt (text), created_at (text), units (number) — or import the CSV templateagentagent via the n8n APINew models are auto-detected. To add pricing for a newly released model, add one line to the MODEL_RATES table inside the code node.
Self-hosted users may need to enable Data Tables with N8N_ENABLED_MODULES=data-table in their environment.
Like this workflow? Let me know! Follow me on LinkedIn for more n8n automation and AI agent builds.
Cheers,
Ben