MCC Account Budget Control
Monitors remaining account budget (prepaid balance) across all accounts under an MCC label, calculates days until the budget runs out based on 7-day average spend, writes a summary to a Google Sheet, and sends Telegram alerts per account.
by Dmytro Tonkikh·chiliad.io
Overview
Runs from your MCC account and processes every child account tagged with a specific account label. For each account it reads the active account budget via GAQL, computes the remaining balance, average daily cost, yesterday's and this month's spend, and the projected days until the budget hits zero. Results are written to a Google Sheet and pushed to Telegram so account managers know when a client balance needs topping up.
Setup
- 1Open your MCC (manager) account and go to Tools → Bulk Actions → Scripts.
- 2Click the + button to create a new script and paste the code below.
- 3Create a Google Sheet and put its URL in SPREADSHEET_URL.
- 4In your MCC, create an account label (default "Balance") and apply it to every child account you want monitored; set ACCOUNT_LABEL to match.
- 5Create a Telegram bot via @BotFather and put its token in TELEGRAM_BOT_TOKEN; add the bot to your chat(s) and map account names to chat IDs in ACCOUNT_NOTIFICATIONS. Leave the token empty to skip Telegram and only write the spreadsheet report.
- 6Authorize the script (it needs Google Sheets and external URL access), preview once to verify the report, then schedule it Daily — morning is recommended so balances are reviewed at the start of the day.
Configuration Variables
| Variable | Default |
|---|---|
SPREADSHEET_URL | YOUR_SPREADSHEET_URL |
SHEET_NAME | Balance |
ACCOUNT_LABEL | Balance |
TELEGRAM_BOT_TOKEN | (empty) |
ACCOUNT_NOTIFICATIONS |
Expected Output
📌 Client A 💰 Remaining budget: 1 240 EUR 📅 Days to 0: 15 📊 Avg. 7-day spend: 85 🔍 Spent yesterday: 92 📈 Spent this month: 940 Report written: 8 account(s) → Balance
Notes
Requires an MCC (manager) account — executeInParallel processes up to 50 child accounts per run. Only accounts with an approved account-level budget that has a finite spending limit (prepaid or invoiced billing with a cap) report a balance; pay-as-you-go accounts and budgets with an unlimited spending limit are skipped. The Telegram alert links the account name to the Google Ads billing page using the account's OCID, which the script fetches automatically.