Skip to main content
This recipe sends one short email each week. It answers the questions a group lead volunteer asks most:
  • 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?
It uses Google Apps Script and your own Gmail account. It takes about ten minutes.

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
Keep the html() function. Anyone can type a name into the public waiting-list form. Without html(), a name could put a link or an image into your email.

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

Change api-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, offered or accepted. Change WAITING to 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.