Google Drive
Prerequisites
-
Drive folder link - The link to the Google Drive folder you want to sync files from (includes files located in subfolders)
-
A GCP project
-
Enable the Google Drive API in your GCP project
-
Service Account Key with access to the Spreadsheet you want to replicate
​
Setup guide
The Google Drive source connector supports authentication via either OAuth or Service Account Key Authentication.
We recommend using Service Account Key Authentication. Follow the steps below to create a service account, generate a key, and enable the Google Drive API.
​
Step 1: Set up the service account key
Create a service account
-
Open the Service Accounts page in your Google Cloud console.
-
Select an existing project, or create a new project.
-
At the top of the page, click + Create service account.
-
Enter a name and description for the service account, then click Create and Continue.
-
Under Service account permissions, select the roles to grant to the service account, then click Continue. We recommend the Viewer role.
​
Generate a key
-
Go to the API Console/Credentials page and click on the email address of the service account you just created.
-
In the Keys tab, click + Add key, then click Create new key.
-
Select JSON as the Key type. This will generate and download the JSON key file that you'll use for authentication. Click Continue.
​
Enable the Google Drive API
-
Go to the API Console/Library page.
-
Make sure you have selected the correct project from the top.
-
Find and select the Google Drive API.
-
Click ENABLE.
If your folder is viewable by anyone with its link, no further action is needed. If not, give your Service account access to your folder. Check out this video for how to do this.
​
Step 2: Integrate with LeanWorks
Share your service account key json file with leanworks.
​