Google Drive
Module | Cloudlink - Google Drive |
Technical Name | cloud_link_gdrive |
Cloudlink - Google Drive allows you to connect Odoo with Google Drive. This extension is ideal if you want to back up your documents to the cloud.
Setup
You can connect Google Drive to Odoo via two authentication flows.
Service Account Flow (Recommended)
- Create a Google Cloud Project
- Enable the Google Drive API
- Create a service account and note its email.
- Create a service account key and save it in JSON format. Copy the content of the JSON file into the Service Account Credentials field
- Share a Google Drive folder with the service account email
- Fill Root ID with the id of your shared drive.
Authorization Code Flow (User-based, OAuth, recommended for standard Google accounts)
- Create a Google Cloud Project
- Enable the Google Drive API
- Create OAuth 2.0 Client Credentials (Click “Create Client”). Application type: Web application.
- Add the Redirect URI shown in the Odoo Google Drive form to the list of redirect URIs in Google Cloud Console.
https://<your_odoo_domain>/cl_link_gdrive/token
- Download the OAuth client secret JSON file. Paste its content into the Client Secret File field in Odoo.
- Click “Authorize” in the Odoo Google Drive form and complete the browser-based login/consent flow.
- Once authorized, the refresh token is saved and used for API access.
- Fill Root ID with the id of your shared drive.
Google Drive Settings
Service Account Credentials
A service account key in JSON format.
Client Secret File
OAuth client secret (JSON) downloaded from Google Cloud Console, required when using the Authorization Code Flow.
Redirect URI
The URI that must be added to the list of authorized redirect URIs in the OAuth credentials in Google Cloud. This value is auto-generated by Odoo. Copy it from the form and use it in the Google Cloud Console setup for your OAuth client.
Root ID
The id of a shared drive.