Skip to product information

n8n AI Spend Cap per Workflow with Google Sheets & Slack

n8n AI Spend Cap per Workflow with Google Sheets & Slack

 (200+Reviews)
Regular price £75.99
Regular price £75.99 Sale price
SAVE Sold out
⬇
Instant Digital Download
∞
Unlimited Downloads
★
Lifetime Access in Your Account
🔥
128+ Sold
Popular with n8n builders
⚡
23 people viewing
High interest right now
✅
9 added today
Fast-moving digital product
n8n AI Spend Cap per Workflow with Google Sheets & Slack

n8n AI Spend Cap per Workflow with Google Sheets & Slack

Regular price £75.99
Regular price £75.99 Sale price
SAVE Sold out

AI Spend Cap per n8n Workflow—Budgeted with Google Sheets + Slack Alerts

Stop surprise AI costs. This n8n workflow enforces a per-workflow daily AI spend cap by tracking token usage in an n8n Data Table, consulting budgets and model pricing in Google Sheets, and sending targeted Slack alerts when thresholds are crossed.

What this workflow does

  • Receives a call from another workflow via an Execute Workflow action with an action of check (pre-flight) or record (post-call), plus the workflow name and usage or estimates.
  • Loads budget rules from Google Sheets tab “Budgets” and model token pricing from tab “Model Prices”.
  • Resolves the correct budget row (or uses a configured default), applies the configured UTC offset to determine the current budget day, and reads spend totals from an n8n Data Table ledger.
  • For action = check: calculates whether the estimated token cost fits within the remaining daily cap and returns allowed/blocked back to the calling workflow.
  • For action = record: prices actual token usage using Google Sheets rates (or a fallback rate for unknown models), updates the ledger, and posts Slack alerts only when warning/cap thresholds are crossed.
  • Daily summary: runs on a schedule, reads yesterday’s ledger entries, and sends a single Slack message summarizing spend by workflow (posts nothing if there were no entries).

Use cases

  • Prevent runaway spend in AI-driven n8n automations (chat, summarization, extraction) by blocking requests before they exceed daily caps.
  • Route operational visibility to teams via Slack when a workflow approaches (warning) or hits (cap) its daily budget.
  • Provide SaaS operators with daily, per-workflow cost reporting using an audit-friendly ledger in n8n Data Table.

Technical details

  • Google Sheets: reads Budgets and Model Prices tabs (spreadsheet ID required).
  • n8n Data Table: stores token/cost totals as a ledger and supports daily rollups.
  • Slack: sends one-time threshold alerts and a daily spend summary.
  • Core nodes: if, set, code, slack, switch, data table.

Setup note: Create and connect Google Sheets credentials, set the spreadsheet ID, and ensure the required “Budgets” and “Model Prices” tabs match the node’s expected columns.

View full details