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 tripsAndCamps in the toolbar and press Run. Open the Trips and camps tab. Use Data → Create a filter to show one event at a time. To refresh it each morning in the weeks before a camp, add a trigger: choose Triggers (the clock), then Add Trigger. Function:tripsAndCamps. Event source: Time-driven. Type: Day timer.
4. Switch to your group
Changeapi-demo.scoutworks.app to api.scoutworks.app, and replace the sandbox key with your own. Your key needs:
Notes
- Health information is not here. The API never sends medical details, dietary needs or emergency phone numbers. Take those from Scoutworks itself.
- Maybe and waiting list. To add young people who said maybe or are on the event’s waiting list, change
GOINGto['rsvp_yes', 'rsvp_maybe', 'rsvp_waitlist']. Add a column witha.rsvpso you can tell them apart. - Meetings too. Remove the
.filter(…)line to list every event, including normal meetings. This makes one extra request for each event, so keepMONTHS_AHEADsmall. - Joint events. A trip run by another group that yours has a place on is listed too. Only your own young people are in its list.