Templates / Track monthly OpenAI token usage with Google Sheets and Gmail reports

Track monthly OpenAI token usage with Google Sheets and Gmail reports

Ready for 3.0

by Patrick Campbell ✓ · 165 views · created 2026-01-12 · Document Extraction

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What this workflow does

This workflow has 9 nodes and runs on a schedule (every month). Along the way it connects Google Sheets, Google Drive and Gmail. It also calls api.openai.com over HTTP.

How it runs

Trigger: On a schedule (every month).

  1. Create Monthly Report from Template (Google Drive): copy
  2. Fetch OpenAI Usage Data (HTTP Request): calls api.openai.com
  3. Transform Usage to Daily Breakdown (Code): runs custom JavaScript code
  4. Append Data to Google Sheet (Google Sheets): append
  5. Export Sheet as Excel (Google Drive): download
  6. Export Sheet as PDF for Email (Google Drive): download
  7. Archive Report to Drive (Google Drive): uses Google Drive
  8. Email Report to Stakeholder (Gmail): uses Gmail

Services it uses

Google SheetsGoogle DriveGmail

HTTP calls to: api.openai.com

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

Nodes used (6)

From the author

Who's this for Finance teams, AI developers, product managers, and business owners who need to monitor and control OpenAI API costs across different models and projects. If you're using GPT-4, GPT-3.5, or other OpenAI models and want to track spending…

Excerpt from Patrick Campbell 's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.