Skip to main content
Before you order badges, you need to know how many of each one to buy. This recipe builds that list in a Google Sheet. It counts every badge that is completed but not yet awarded, and names who gets each one. It takes about five minutes.

1. Add the script

In your Google Sheet, choose Extensions → Apps Script. Delete what is there, paste the script below and choose Save.
Code.gs

2. 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.

3. Run it

Choose badgesToOrder in the toolbar and press Run. Open the Badges to order tab. Each row is one badge, with how many to order and who they are for. Run it again each time you place an order. When you give a badge out, mark it as awarded in Scoutworks. It then leaves this list.

4. Switch to your group

Change api-demo.scoutworks.app to api.scoutworks.app, and replace the sandbox key with your own. Your key needs the badges:read scope.

Variations

  • A button in the sheet. Add this function, then reload the sheet. A Scoutworks menu appears with the command in it.
  • Badges on the way. Change status=completed to status=in_progress to see what young people are working on now. It helps you order early.
  • One young person. Add &memberId= and a member’s id to see every badge record for one person. Get the id from the members list.