Sync BambooHR time off to Google Calendar and Sheets
Push every newly approved BambooHR time off request to a shared team calendar and a running PTO log spreadsheet, every hour.
Build a code workflow that pushes newly approved BambooHR time off requests to a shared Google Calendar and a Google Sheets PTO log, on an hourly schedule.
Trigger: cron, every hour.
Step 1 (BambooHR "List Time Off Requests"): query for requests with status=approved, with a date range covering today through 90 days from now. BambooHR is not a poll provider, so use a watermark on the approval timestamp stored in workflow state. Filter the returned requests down to ones whose approval timestamp falls strictly after the stored watermark and at or before the current run time. After processing, advance the watermark to the current run time. On the very first run, initialize the watermark to one hour before the run so the first execution doesn't backfill the whole company.
Step 2, for each new approval (Google Calendar "Create Event"): create an event on a configured shared calendar (default to a "Team OOO" calendar whose ID is a workflow input). Title: "{Employee Name} OOO". Start and end: the start and end dates from the BambooHR request, sent as all-day dates (no times). Description: the time off type (e.g. Vacation, Sick, Parental) plus the BambooHR request ID for traceability. Mark the event as transparent (free), not busy, so it doesn't block anyone's working hours. Use the BambooHR request ID as a stable seed for the calendar event's id so retries are idempotent.
Step 3, for each new approval (Google Sheets "Append Values"): append a row to a configured PTO log spreadsheet (spreadsheet ID and sheet/tab name are workflow inputs). Columns in order: Employee, Department, Type, Start, End, Days, Approved At, BambooHR Request ID. The BambooHR Request ID column is the idempotency key; if the workflow ever needs to be re-run for a window, a downstream consumer can dedupe on that column.
Inputs the user should configure: the shared Google Calendar ID, the Google Sheets spreadsheet ID, the sheet/tab name on that spreadsheet, and optionally a list of BambooHR department names or time off type IDs to include (default: all).
Error handling: if Google Calendar or Google Sheets fails for an individual request, do not advance the watermark past that request; surface the failure in the run log and let the next run retry it. Honor BambooHR's Retry-After on 503 responses.
Additional information
What does this prompt do?
- Checks BambooHR every hour for time off requests that were approved since the last run.
- Adds each new request to a shared Team OOO calendar as an all-day event titled with the employee's name.
- Appends a row to your PTO log spreadsheet with employee, department, type, dates, and the BambooHR request ID.
- Uses the request ID to avoid duplicate calendar events or duplicate rows if the workflow retries.
What do I need to use this?
- A BambooHR account with permission to read time off requests.
- A Google account that can edit a shared Team OOO calendar.
- A Google Sheets PTO log spreadsheet with a header row already in place.
How can I customize it?
- Change how often it runs (every 15 minutes, every hour, twice a day).
- Point it at a different shared calendar or a different PTO log spreadsheet.
- Filter to a specific department, office, or set of time off types before posting.
Frequently asked questions
Will this create duplicate events if it runs twice?
Does the calendar event block people's working hours?
Can I see the type of leave on the calendar?
What happens if a request is denied or cancelled after it syncs?
Does this work if my company is on BambooHR's Essentials plan?
Stop pinging HR every time you need to know who's out.
Connect BambooHR and Google once, and Geni will keep your team calendar and PTO log in sync on its own.