Google Drive Datasource

Configure and manage the synchronization between a Google Drive content and Paradigm

This page contains the setup guide and reference information for the Google Drive source connector.

The Google Drive source connector pulls data from a folder in Google Drive. Subfolders are recursively included in the sync. All files in the specified folder and all sub folders will be considered, excluding filetypes that are not supported or too large.

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 gDrive folder you want to synchronize

Setup guide

The Google Drive source connector supports authentication Service Account Key Authentication.

Set up the service account key

Create a service account

  1. Open the Service Accounts page in your Google Cloud console.
  2. Select an existing project, or create a new project.
  3. At the top of the page, click + Create service account.
  4. Enter a name and description for the service account, then click Create and Continue.
  5. Under Service account permissions, select the roles to grant to the service account, then click Continue. We recommend the Viewer role.

Generate a key

  1. Go to the API Console/Credentials page and click on the email address of the service account you just created.
  2. In the Keys tab, click + Add key, then click Create new key.
  3. 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

  1. Go to the API Console/Library page.
  2. Make sure you have selected the correct project from the top.
  3. Find and select the Google Drive API.
  4. 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.

In the Paradigm admin:

Datasource

  • Add your Google Cloud service

    { "type": "service_account", "project_id": "YOUR_PROJECT_ID", "private_key_id": "YOUR_PRIVATE_KEY", ... }
  •  account key

  •  in JSON format:

  1. For Folder Link, enter the link to the Google Drive folder. To get the link, navigate to the folder you want to sync in the Google Drive UI, and copy the current URL.
  2. Configure the optional Start Date parameter that marks a starting date and time in UTC for data replication. Any files that have not been modified since this specified date/time will not be replicated. Use the provided datepicker (recommended) or enter the desired date programmatically in the format YYYY-MM-DDTHH:mm:ssZ. Leaving this field blank will replicate data from all files that have not been excluded by the Path Pattern and Path Prefix.
  3. Click Set up source and wait for the tests to complete.