Track AI spend — the cost of every run in a sheet

The scenario reads the usage of every AI assistant run, breaks it down by model and logs it to a sheet with an estimated cost.

  • Usage and cost visible right after each run
  • Broken down by assistant and model
  • No separate tracking service needed
  • The whole history builds up in AWS DynamoDB
n8n

How it works

To move data from AWS DynamoDB to automatically, use a ready-made scenario — no manual exports.

  1. Starts when: When clicking ‘Test workflow’
  2. Then: AI Agent
  3. Then: Call sub-workflow
  4. Then: Think
  5. Then: Extract token usage data
  6. Then: Split Out
  7. Then: Sum Token Totals - aggregate by model
  8. Then: Record token usage
  9. Then: Get execution data
  10. Starts when: When Executed by Another Workflow
  11. Then: Gemini
  12. Then: OpenAI
  13. Then: Anthropic

You can launch this integration in Scriptera: describe the task in plain words — the scenario is built, launched and monitored for you.