Google Drive integration: method and functional background
The Google Drive integration gives i-Reserve a file manager on top of the customer's own Google Drive account. Users with the right permissions can view, upload, rename, move, copy and delete documents per entity (customer, booking, company, event or object) from within i-Reserve. It uses the Google Drive API v3.
Important: interactive, not event-driven
Unlike the calendar integrations, the Drive integration has no automatic triggers on booking statuses. Files are not created automatically on a status change. The integration is interactive: files are managed through the file manager (a dashboard block / UI component) that performs the Drive operations directly.
Authentication
Delegated OAuth 2.0 (authorization-code flow) with the scope https://www.googleapis.com/auth/drive. The customer provides their own OAuth client, so only their own Drive account is accessed. i-Reserve stores an access_token + refresh_token and refreshes them automatically (on a 401). If the refresh token expires (e.g. revoked consent), reconnecting is required.
Per-entity folder structure
The integration creates and uses a folder structure based on a configurable pattern, e.g. {context}/{itemname} (#{itemid}) — resulting in folders like customer/John Smith (#1234) or booking/Morning slot (#567). The entity → Drive folder-id resolution is cached so it does not have to search every time; an admin can also pin a folder manually (override). Optionally missing folders are created automatically on first use.
What the file manager can do
- List folders and files, show thumbnails, download/stream files.
- Create, rename, delete (to trash) folders.
- Upload, rename, move, copy, delete files.
- Generate a shareable (public) link.
Every operation is permission-driven (read / create / delete per entity type).
Limitations
- CRM module required: without the CRM licence module the integration is unavailable.
- Google-native files (Docs/Sheets/Slides,
.gdoc/.gsheet) cannot be uploaded — they are references, not real files. Move Google Docs within Drive itself. - Files live in the integration's Drive identity; opening is via the Drive web link, downloads/thumbnails go through the integration's OAuth token.
- The redirect URI must match exactly what is registered in the Google project.





