- How many young people are in each section?
- How many are on the waiting list for each section?
- Who applied this week?
- Which applications still wait for a first reply?
1. Add the script
Go to script.google.com and choose New project. Delete what is there, paste the script below and choose Save.Code.gs
2. Add your key and the address
In the script editor, choose Project Settings (the cog), then Script Properties. Add two properties:3. Run it once
Choose sendWeeklyNumbers in the toolbar and press Run. Google asks for permission the first time: the script needs to reach an external service and to send email as you. Check your inbox.4. Send it every Monday
Choose Triggers (the clock), then Add Trigger. Function:sendWeeklyNumbers. Event source: Time-driven. Type: Week timer. Day: Every Monday. Time: 7am to 8am. Choose Save.
5. Switch to your group
Changeapi-demo.scoutworks.app to api.scoutworks.app, and replace the sandbox key with your own. Your key needs members:read and waiting-list:read. It does not need a .contacts scope.
Notes
- Who counts as waiting. The script counts applications at
received,contacted,offeredoraccepted. ChangeWAITINGto count other stages. The API reference lists them all. - Each member counts once, in their main section. A young person who is moving on is not counted twice.
- Gmail limits. A free Gmail account can send email to about 100 people a day from a script. A weekly email to a few leaders is far below this.