How to Stop Double Bookings in Google Forms
Jump to the free Apps Script builder
Quick answer
Check Google Calendar availability before creating an event from a Google Forms response. A spreadsheet-bound Apps Script can acquire a document lock, check Calendar FreeBusy, and create the event only if the interval is clear. Alternatively, connect the form to CalGuard and enable conflict checks. Either approach checks the request after submission. It does not turn Google Forms into a live calendar picker.
For a booking page that shows available times before anyone submits, see Google Forms vs. Google Calendar Appointment Schedules.
Decide what a form submission means
A Google Form is good at collecting information in one consistent place. That makes it useful for rooms, interviews, office hours, and other requests that need more detail than a calendar event alone. The trap is treating the form confirmation as a booking confirmation. Forms can accept two answers for the same time before either person has seen what the other entered.
Tell respondents that they are requesting a time and should wait for a calendar invitation or a confirmation from the organizer. Make that language visible at the start of the form and in the message after submission. If you need every respondent to see and select a currently open slot, choose a booking page designed to work that way. The approaches below suit a form that collects requests and checks each one before writing to Calendar.
Choose a test calendar before you start. Give it an obvious name and set its time zone to match the schedule you want to sell or share. Test separate form responses rather than editing the first response when you are checking duplicate requests. An edit tests a different behavior: updating an existing booking.
Option A: Add a spreadsheet-bound Apps Script
This option is for organizers who want to own and maintain the automation. The form sends its answers to a linked spreadsheet. An installable trigger reads the submitted row, determines the requested start and end, and runs the availability check using the account that installed the trigger. The sample below stays small so you can read and change it.
In Forms, add a short-answer question named Start and another named Event title. Make Start required. Use an example such as 2027-02-18T14:00:00-05:00 in the question description. The offset is part of the answer. It identifies the actual moment without relying on ambiguous text such as “2 PM next Thursday.” The example uses an explicit offset because the sample does not combine separate native date and time questions. If your respondents should choose dates through native fields, the CalGuard workflow below is easier to set up.
Link the form to a Google Sheet under Responses, then open that Sheet and choose Extensions → Apps Script. Add the Calendar advanced service from Services in the script editor. If the script uses a standard Cloud project, enable the Calendar API there too. Paste the generated script into the spreadsheet-bound project. In the Triggers panel, add a trigger for bookFromForm, select From spreadsheet, and choose On form submit. Review the requested permissions and authorize it with the account that can edit the destination calendar.
Prefer setup inside Forms? See CalGuard.
The calendar ID identifies the calendar that receives new events. Use primary for the trigger owner’s primary calendar, or paste the ID from Calendar settings. Duration sets the event length. Buffer expands the queried window on both sides without changing the actual event. The display time zone appears in the Calendar event request; it does not override the UTC offset in the submitted timestamp. That distinction matters near clock changes.
The logic is deliberately conservative. A missing or failed availability result stops processing. The script does not assume an empty calendar just because Google did not return an answer. At a high level, the critical section looks like this:
const lock = LockService.getDocumentLock();lock.waitLock(15000);try { // Check the requested window, including any buffer. // Create an event only after a successful, clear FreeBusy response.} finally { lock.releaseLock();}A document lock protects simultaneous executions of this script within the same document. It cannot prevent someone from opening Calendar and adding an event in the small interval between the check and the insert. It also does not coordinate unrelated scripts on different spreadsheets. If several teams share a room calendar, send their form requests through one booking workflow wherever possible and agree on which staff may add bookings directly.
The sample intentionally does not notify the organizer or edit old events. A busy slot simply produces no event. If you need auditing, write the outcome into a column on the response Sheet and restrict access to that Sheet. If respondents can edit answers, design a stable link between the original response and Calendar event before enabling updates. Otherwise an edit may look like a second booking to a simple script.
Option B: Use CalGuard in Google Forms
Choose CalGuard if you want native date and time questions, a setup sidebar, and a log you can view without writing Apps Script. The following steps are also useful as a checklist for somebody who has taken over an existing form and wants to see how it books.
- Create the booking form. Add a required date question with the year, a required time question, and any details needed to name the appointment. If the end can fall on another day, add separate end date and end time questions.
- Open the add-on and choose a calendar. In the form editor, open CalGuard from the add-ons menu. Select a calendar that your account can edit. For a timed booking, choose a fixed duration or map the end time from the form. Use all-day mode when the reservation should cover a whole date.
- Turn on conflict checks and run a dry test. Open Conflicts and enable availability checks. A dry run previews the setup without writing an event or using monthly booking quota. Fix a missing date mapping, calendar permission, or invalid time zone before going further.
- Activate and submit an available time. Click Save & Activate. Open the respondent version of the form and submit a new request. In Logs, find the Created entry and open the event in Calendar. Check the title, start, end, and destination calendar.
- Submit a fresh response for the same time. Look for Conflict blocked in Logs and verify that there is still only one event. If respondent notifications are enabled and an email was collected, check the test inbox too.
For a longer setup walkthrough, start with the CalGuard quickstart. The Free plan checks the chosen booking calendar with conflict checks on and covers up to 10 new events each month. Pro can check more calendars and add before or after buffers when you need prep or travel time.
Walkthrough video coming soon.
Test the edges before sharing the link
Start with a simple 30-minute appointment. For example, create 2:00–2:30 PM, then request 2:15–2:45 PM. The second interval overlaps and should be blocked. Now request 2:30–3:00 PM with no buffer. That request touches the first booking at the boundary without overlapping it. If your staff need time to prepare, turn on a buffer and repeat the same exercise; the second booking should now be treated as unavailable.
Test time zones as soon as more than one person uses the form. Pick a time with a known offset and confirm Calendar shows the same instant for the organizer and a guest in another zone. If a request moves between zones during a daylight saving transition, check whether the local time exists and whether it appears twice. For the script sample, use the offset intended for that date. For CalGuard, verify the destination calendar’s time zone and review errors for ambiguous or invalid answers.
An all-day rehearsal is useful for rooms and equipment. Add a busy event for the full day, then submit a timed booking on that date. Repeat after marking the event Free. The expected outcomes are different because Free events do not take up availability. For multi-day bookings, check the final date in Calendar to confirm the reservation covers the last day the respondent selected.
Troubleshoot a missing or duplicate event
When nothing appears in Calendar, first confirm which version of the form you opened and which calendar the trigger owner can edit. Google Apps Script Editor Add-on test deployments can show the sidebar and run a dry test, but they do not run installable form submission triggers. Use a live installation to test real submissions. Check the response Sheet or CalGuard Logs for evidence that the request was received and processed.
If Clasp or Google authorization prompted you to pick an account, check that the selected account owns or can edit the correct calendar. Browser profiles with several Google accounts can make it hard to see which account received the permission. Reopen the form in a profile with the organizer’s account only and confirm the target calendar before testing again.
If two events appear, look at how they were created. An old automation may still be attached to the form, a teammate may have installed a second trigger, or another application may write to the same calendar. Switch off redundant automations one at a time and repeat a test on the sandbox calendar. Compare the timestamps and event titles in the log before deleting anything. A single working trigger plus a conflict check is much easier to diagnose than several overlapping workflows.
Common questions
Can Google Forms show live Calendar availability?
A standard Google Form collects requests. A post-submit check can block event creation but does not remove busy slots from the form.
Why did my all-day event not block a booking?
Calendar events marked Free are transparent to availability checks. Mark the all-day event Busy if it should reserve the time.
Can people book back to back?
Yes, when the first event ends at the next event’s start and no buffer applies.
Want to try CalGuard?
Leave your email for an installation update. You can use the guide and the free builder anytime.
Get CalGuard updates