# Export timed Calendar rows for the reconciliation draft

AC013 is an optional, manual input aid for the [Calendar reconciliation job](https://bulldo.gs/jobs/calendar-reconciliation/). It reads one calendar in your own Google account and prints four tab-separated columns: instance key, resource label, UTC start and UTC end. It does not access titles, descriptions, locations or attendees in code; change events; send invitations; install a trigger; or transmit rows to bulldo.gs. Event identifiers and times remain private data in your Apps Script execution log. The browser comparison remains a local drafting tool. This source is MIT licensed.

1. Copy [calendar-export.gs](https://bulldo.gs/jobs/calendar-export.gs) into a new Apps Script project in the Google account that may read the calendar. In Project Settings, show the `appsscript.json` manifest and set `oauthScopes` to `["https://www.googleapis.com/auth/calendar.readonly"]`. This read-only grant may allow the script to read calendars the account can access, even though this code selects one. Check the consent screen before authorizing. Set `CALENDAR_ID`, `RESOURCE_NAME`, `WINDOW_START_UTC` and `WINDOW_END_UTC` at the top. Use a single calendar ID and a single literal resource label such as `Room A`. Boundaries must be valid `YYYY-MM-DDTHH:mm:ssZ` UTC values, in increasing order, no more than 31 days apart.
2. Select `exportCalendarReconciliationRows`, run it manually and authorize Calendar read access if prompted. Inspect the execution log. The script requests at most 501 instances and rejects 501, all-day events, duplicate instance keys, invalid intervals and output over 6,000 characters before printing any schedule rows. Narrow the window if it rejects; retain bookings that cross batch boundaries when comparing batches.
3. Confirm both `CALENDAR_EXPORT_BEGIN rows=N` and `CALENDAR_EXPORT_END rows=N` appear with the same count. Copy **only** the four-column lines between them, without log timestamps, severity prefixes, blank lines or markers. Count the copied lines and verify the first and last line against the source. Logs can truncate; missing markers, a mismatched count or incomplete lines make the export unusable. Zero rows means the Scheduled input can remain empty for that checked calendar/window.
4. Paste the copied rows into **Scheduled bookings** on the browser job. Prepare **Expected bookings** independently from your plan with the same calendar/window, identical resource label and matching instance keys where the plan refers to existing events. A separately invented planned ID will show as missing/extra. Alternatively compare two snapshots exported with this script using the same calendar, resource and window. The exporter does not create an independent plan. Review every result against Calendar before changing any event yourself.

Nonrecurring events use their Calendar event ID as the key, so a moved time can appear as changed. Recurring instances use the series ID plus each UTC start to distinguish occurrences; a moved recurring start changes the key and appears as missing plus extra. Cancellations, omitted calendars, attendee availability, permissions, alias equivalence and complete recurrence coverage are not verified. The exporter rejects all-day events because it cannot choose the intended explicit instants for this comparison. Check scope and timezone boundaries manually, especially when a booking crosses the window edge. Google documents the [calendar event query](https://developers.google.com/apps-script/reference/calendar/calendar#geteventsstarttime_endtime_options) and [event methods](https://developers.google.com/apps-script/reference/calendar/calendar-event) used here.

This source has no verified execution against a real Google calendar. Fictional checks establish only local behavior. Do not paste private schedules into public support requests. A successful export or browser draft does not establish a completed scheduling change or useful independent use.

## License

MIT License. Copyright (c) 2026 bulldo.gs contributors.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
