Skip to main content
  • For: Scout and Cub leaders
  • You get: a full-screen scoreboard that updates every minute, and a phone shortcut that adds points to a patrol
  • Time: about twenty minutes
  • Scopes: recognition:read and members:read for the board; recognition:write for the shortcut
Points mean more when the patrols can see them. This recipe puts your section’s patrol standings on the hut’s screen or projector, biggest score first, and refreshes it every minute. A leader adds points from their phone with two taps, and the board catches up within the minute. The points are the same ones Scoutworks shows on the section’s scoreboard, so nothing needs copying back.
Adding points changes Scoutworks, so the read-only sandbox key can show the board but cannot run the shortcut. Use your own key with recognition:write, and try one award first.

1. Try the requests

Then ask for the standings. You get one entry for each section that has patrols. Add sectionId and a section id from the first list to get just that section:
Each patrol has an id, a name, a colour and its points. Points a young person earns count for the patrol they were in when they earned them.

2. Add the script

Go to script.google.com and choose New project. Call it Scoutworks scoreboard. Paste the script below and choose Save.
Code.gs

3. Add your key and publish the board

Choose Project Settings (the cog), then Script Properties → Add script property. Property: SCOUTWORKS_API_KEY. Value: the sandbox key to try it, or a key with recognition:read and members:read. Choose Deploy → New deployment → Web app, Execute as: Me, Who has access: Anyone, and copy the address. On the hut’s screen, open it with ?section=scouts (or a word from your section’s name) on the end, and make the browser full screen.
Anyone with the address sees your patrols’ names and scores. The board never shows a young person’s name.

4. Make the points shortcut

Read your patrols’ ids from the standings request in step 1. Then, on an iPhone, open Shortcuts, choose + and call it Patrol points:
  1. Choose from Menu with one item per patrol: Eagles, Owls and so on.
  2. In each patrol’s branch, a Text action holding that patrol’s id.
  3. Ask for Input, type Number, prompt “How many points?”. Negative numbers take points away.
  4. Current Date, then Format Date as yyyyMMddHHmmss. This makes the award’s reference.
  5. Get Contents of URL: your API address, https://api.scoutworks.app/api/v1, then /patrol-scores. Method POST. Headers: Authorization set to Bearer and your key. Request Body JSON: items, a list holding one dictionary with reference (the formatted date and the patrol’s id), sectionId, patrolId (the Text) and points (the number).
  6. Show Notification: “Points added”.
Each award carries its reference. If the hut’s Wi-Fi drops and the shortcut sends it again, Scoutworks answers unchanged and adds nothing twice.
The shortcut holds your key. Give that key only recognition:read and recognition:write, so a lost phone can add points and read nothing else.

5. Try one award

Run the shortcut and give one patrol 1 point. Within a minute the board shows it, and so does the section’s scoreboard in Scoutworks, marked as added by the key. To take it back, undo it on the scoreboard in Scoutworks.

6. Switch to your group

The shortcut already uses api.scoutworks.app. In the script, change api-demo.scoutworks.app to api.scoutworks.app, and put your own key with recognition:read and members:read in Script Properties. Then choose Deploy → Manage deployments → Edit, Version: New version, Deploy: the board’s address stays the same.

Variations

  • Points for one young person. Send memberId in place of patrolId: the points count for them and for their patrol.
  • A whole evening at once. One request takes up to 100 awards, each with its own reference.

If something goes wrong

See Errors for every code. An award with an error in the answer’s data names what was wrong with it, such as a patrol from another section. The other awards in the request are still added.