GCP Service Account Key Creation Process
The GDrive connector requires a service account key generated by a GCP project. You can use an existing project you own or follow the following steps to create a new project:
Go to the Manage resources page in the GCP console and click Create Project.
In the New Project window that appears, add any project name, organization, and location of your choosing.
Note the project ID (which is directly below the project name) as you will need it when enabling APIs in step 2.
Click Create.
Go to Billing in the GCP console.
Click Link a billing account to set up billing for this project.
Ensure that the billing account has a corporate credit card attached to it as a “free trial billing tier” will not work.
If you need to have another user set up the credit card, assign either Billing Account User or Billing Account Admin role for this user
In the project you created or in your existing project, ensure the following APIs are enabled by going to the link (replacing PROJECT_ID with your project ID) and clicking Enable if not already enabled:
Admin SDK API (admin.googleapis.com) https://console.developers.google.com/apis/api/admin.googleapis.com/overview?project=[PROJECT_ID]
Cloud Resource Manager API (cloudresourcemanager.googleapis.com) https://console.cloud.google.com/apis/api/cloudresourcemanager.googleapis.com/overview?project=[PROJECT_ID]
Service Usage API (serviceusage.googleapis.com)
https://console.developers.google.com/apis/api/serviceusage.googleapis.com/overview?project=[PROJECT_ID]Drive API (drive.googleapis.com) https://console.developers.google.com/apis/api/drive.googleapis.com/overview?project=[PROJECT_ID]
Docs API (docs.googleapis.com) https://console.developers.google.com/apis/api/docs.googleapis.com/overview?project=[PROJECT_ID]
Sheets API (sheets.googleapis.com) https://console.developers.google.com/apis/api/sheets.googleapis.com/overview?project=[PROJECT_ID]
Optional APIs for Gmail/Google Calendar integration:
Gmail API (gmail.googleapis.com) https://console.developers.google.com/apis/api/gmail.googleapis.com/overview?project=[PROJECT_ID]
Google Calendar API (calendar-json.googleapis.com) https://console.developers.google.com/apis/api/calendar-json.googleapis.com/overview?project=[PROJECT_ID]
Go to the Service Accounts page in the GCP console and click Select a Project.
Select your project and click Open.
Click Create Service Account. Enter the service account name (glean-admin), ID (which should be automatically populated from the name), and description (optional), then click Create and Continue.
Skip Grant this service account access to project and Grant users access to this service account. Click Done.
Back on the Service Accounts page for your project, you should now be able to see the service account that was just created. Click the 3 dots below Actions and click Manage Keys.
Click Add Key > Create New Key. In the panel that appears, select the key type JSON then click Create.
A private JSON key will be saved to your computer.
Go to the Advanced Settings page in Glean. Click Secret. Enter GDRIVE_SERVICE_ACCOUNT_KEY_JSON as the key name, and upload the JSON key which will automatically populate the key value. Click Submit. If you are unsure about this step, please ask your Glean representative for assistance.
Finally, go to the GDrive Setup page in Glean and go through all the connector steps as normal.