Track OpenAI Admin API usage and costs automatically with Google Sheets
Ready for 3.0Ready 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-12-01.
What this workflow does
This workflow has 26 nodes and runs on a schedule (every day). Along the way it connects Google Sheets.
How it runs
Trigger: On a schedule (every day).
- OpenAI Admin - Get cost (HTTP Request): calls an HTTP API
- OpenAI Admin - get token usage (HTTP Request): calls an HTTP API
- Merge: merges the data from its input branches
- Set api_key and project ids (Edit Fields (Set)): sets or maps fields
- Merge: merges the data from its input branches
- Get project_ids (Code): runs custom JavaScript code
- Merge: merges the data from its input branches
- Split Out: splits a list into separate items
- Add api_key name to token usage (Code): runs custom JavaScript code
- OpenAI Admin - Get Project details (HTTP Request): calls an HTTP API
…plus 15 more steps. See the full node list below.
Services it uses
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.
Check at runtime on n8n 3.0
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Nodes used (8)
- Schedule Trigger
n8n-nodes-base.scheduleTrigger - HTTP Request
n8n-nodes-base.httpRequest - Remove Duplicates
n8n-nodes-base.removeDuplicates - Edit Fields (Set)
n8n-nodes-base.set - Code
n8n-nodes-base.code - Merge
n8n-nodes-base.merge - Split Out
n8n-nodes-base.splitOut - Google Sheets
n8n-nodes-base.googleSheets
From the author
Overview This workflow aims to help you and your team track your expenses with OpenAI It automatically collects your OpenAI organization’s API usage and cost data every few days and saves it to a ready-to-use Google Sheets template. It pulls detailed metrics…