Google Drive
Configure Google Drive integration so customers can upload files from their Google Drive during checkout.
The Google Drive integration adds an "Upload from Google Drive" button to the storefront file upload page. When configured, customers can browse their Google Drive account and select files to upload for their print order without downloading them to their computer first. This is useful for customers who store their print-ready files in Google Drive.
The integration uses the Google Picker API and requires three credentials from your Google Cloud project: a Project Number, an API Key, and an OAuth Client ID. All three must be configured for the Google Drive upload option to appear on the storefront.
Configure Google Drive
- From your Unified Admin, go to Settings > Integrations > Google Drive.
- Enter your Project Number, Api Key, and OAuth ClientId.
- Click Save.
Settings
| Field | Description |
|---|---|
| Project Number | Your Google Cloud project number (found on the Google Cloud Console dashboard). Used as the App ID for the Google Picker API. All three fields must be filled for the Google Drive upload option to appear on the storefront. |
| Api Key | Your Google Cloud API key with the Google Picker API enabled. Used to authenticate requests to the Google Drive API for file browsing and downloading. |
| OAuth ClientId | Your OAuth 2.0 Client ID from the Google Cloud Console. Used to authorize customers to access their own Google Drive files through the picker. The OAuth consent screen must be configured in your Google Cloud project. |
Getting Google Drive Credentials
- Go to the Google Cloud Console.
- Create or select a project. Note the Project Number from the dashboard.
- Enable the Google Picker API and Google Drive API from the API Library.
- Go to Credentials:
- Create an API key and restrict it to the Picker API.
- Create an OAuth 2.0 Client ID (Web application type). Add your storefront domain(s) to the authorized JavaScript origins.
- Configure the OAuth consent screen with your app name and authorized domains.
- Enter the Project Number, API Key, and OAuth Client ID in your Unified Admin.
Associations
Print Store
| Area | Effect |
|---|---|
| File Upload Page | When all three credentials are configured, an "Upload from Google Drive" button appears alongside the "Upload from Computer" button on the product file upload page (upload.aspx). Customers click the button, authenticate with their Google account via OAuth, browse their Google Drive files using the Google Picker, and the selected file is downloaded and attached to their order. The button is hidden when any of the three credentials are missing. |
| Custom Upload Templates | Custom upload page templates (Mustache) also support the Google Drive button via the AllowGoogleDriveUpload template variable, which is true when the API Key is configured. |
| File Type Filtering | The Google Picker is configured to only show files matching the product's allowed MIME types, so customers cannot accidentally select unsupported file formats. |
Related Pages
- Dropbox — alternative cloud file upload option on the storefront upload page
- Google Places — address autocomplete at checkout using the same Google Cloud project
- Google Maps — shipment tracking maps using the same Google Cloud project