1. Add the script
1
Open the script editor
In your Google Sheet, choose Extensions → Apps Script.
2
Paste the script
Delete what is there and paste the script below. Choose Save.
Code.gs
2. Add your key
1
Open Script Properties
In the script editor, choose Project Settings (the cog), then Script Properties → Add script property.
2
Add the key
Property:
SCOUTWORKS_API_KEY. Value: the sandbox key to try it, or your own key. Choose Save script properties.3. Run it
Choose importMembers in the toolbar and press Run. Google asks for permission the first time: it needs to reach an external service and to edit this sheet. Then open the Members tab.4. Refresh it every morning
1
Add a trigger
In the script editor, choose Triggers (the clock), then Add Trigger.
2
Set the timer
Function:
importMembers. Event source: Time-driven. Type: Day timer. Time: 6am to 7am. Choose Save.5. Switch to your group
In the script, changeapi-demo.scoutworks.app to api.scoutworks.app. In Script Properties, replace the sandbox key with your own. Your key needs the members:read scope.
Other lists
Change the URL and the columns to read another list:
The API reference lists every field.