Skip to main content
  • For: group admins and whoever runs lettings
  • You get: a calendar feed of hire bookings and blocked dates for your phone or Outlook
  • Time: about fifteen minutes
  • Scopes: hire:read
This recipe turns your hire bookings into a calendar feed. Your lettings secretary, caretaker and leaders subscribe to it once. When a booking is added, confirmed or cancelled in Scoutworks, their calendar follows on its own. Dates you have blocked show too, so nobody promises the hall on a night it is closed. It works the same way as Events in your calendar: a free Google Apps Script web app. It takes about ten minutes.

1. Add the script

1

Create a project

Go to script.google.com and choose New project. Call it Scoutworks hire calendar.
2

Paste the script

Delete what is there and paste the script below. 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. Choose Save script properties.

3. Publish it and subscribe

Publish the script as a web app and subscribe to its address, exactly as in Events in your calendar: Deploy → New deployment → Web app, Execute as: Me, Who has access: Anyone. Then add the Web app URL to Google Calendar, Outlook or Apple Calendar as a subscribed calendar. For one thing you hire out, add ?asset= and its web address name to the end of the address, for example …/exec?asset=main-hall. The name is the last part of the thing’s address on your public hire page. Dates you block for everything show in every feed.

4. Switch to your group

In the script, change api-demo.scoutworks.app to api.scoutworks.app. In Script Properties, replace the sandbox key with your own. Your key needs the hire:read scope. Give it no other scope, and never hire.people:read. After you change the script, choose Deploy → Manage deployments → Edit (the pencil), set Version to New version and choose Deploy. The address stays the same.
Anyone with the address can see when your hall is booked and by which organisation. The feed never holds a hirer’s name, email or phone number, and a private hirer shows only as Private hire. Keep it that way: a key with only hire:read cannot read contact details, even if someone edits the script. Share the address only with the people who run your lettings.

Notes

  • The feed holds bookings and blocked dates from 30 days ago onwards. Cancelled bookings are left out.
  • A booking still pending shows as Provisional, and as tentative in calendars that show it.
  • The script keeps each feed for one hour, so a change in Scoutworks reaches the feed within an hour. Calendar apps then check on their own timetable, often every few hours.
  • Each booking keeps its Scoutworks ID in the calendar, so a moved booking moves in the calendar. It does not appear twice.
  • The reason for a blocked date never leaves Scoutworks. The feed shows only Not available.