- For: treasurers, and the trustees they report to
- You get: a Budgets tab with one row per budget, refreshed every morning
- Time: about ten minutes
- Scopes:
accounting:read
1. Try the request
Paste this into a terminal to see the budgets in the demo group:amount, what is available once budget transfers are counted, what it has spent, and what is remaining. Money is always a string in pounds, such as "125.50", so it never loses a penny.
2. Add the script
In your Google Sheet, choose Extensions → Apps Script. Delete what is there, paste the script below and choose Save.Code.gs
3. Add your key
In the script editor, choose Project Settings (the cog), then Script Properties → Add script property. Property:SCOUTWORKS_API_KEY. Value: the sandbox key to try it, or your own key.
4. Run it
Choose budgetAgainstActual in the toolbar and press Run. The first time, Google asks you to allow the script to reach an outside service. Open the Budgets tab. Spending budgets come first. A spending budget that has spent more than its amount says Over budget.5. Refresh it every morning
1
Add a trigger
In the script editor, choose Triggers (the clock), then Add Trigger.
2
Set the timer
Function:
budgetAgainstActual. Event source: Time-driven. Type: Day timer. Time: 6am to 7am. Choose Save.6. Switch to your group
Changeapi-demo.scoutworks.app to api.scoutworks.app, and replace the sandbox key with your own. A group admin creates the key in Settings → Integrations → API keys with the accounting:read scope.
Variations
- Last year. Change the
findto pick the year by name, for examplep.name === '2025-26', to compare this year with last. - One section. Each budget lists its
sectionIds. Keep only the budgets for one section to give its leader their own sheet. - Bank balances too. Add a tab from
/bank-accounts. Each account has itsbalance, so the trustees see the cash next to the budgets.
If something goes wrong
403 insufficient_scope: the key does not haveaccounting:read. A group admin can add it to the key.- No accounting year includes today: the group has not set up this year in Scoutworks yet, or the last one has ended. A treasurer adds it under Finance.