Track AI Agent token usage and estimate costs in Google Sheets

n8n · Marketing · checked 2026-10-28

Brand hub

This n8n template demonstrates how to obtain token usage from AI Agents and places the data into a spreadsheet that calculates the estimated cost of the execution. Obtaining the token usage from AI Agents is tricky, because it doesn't provide all the data from tool calls. This workflow taps into the workflow execution metadata to extract token usage information. Works well with OpenAI, Google and

At a glance

Brand
n8n
Jobs
Marketing
Sources
1

Dimensions

Sources

Last checked 2026-10-28. Description source: harvest.