Google Drive Connector
  • 30 Sep 2022
  • 3 Minutes to read
  • Contributors

Google Drive Connector


Article Summary

Google Drive Connector

Integrating Tulip with Google Drive v3 API

Introduction

Google Drive API allows the users to create, read and edit google drive files with the right access set to their google accounts. The Goal of this connector is to use Oauth2.0 authentication and integrate with Google Drive V3 API with Tulip using HTTP Connectors & provide our customers with an out-of-box connector that can be imported into their instance.

Purpose

  1. We are going to highlight different HTTP connector functions that can be built by doing HTTP calls to Google Drive V3 API endpoints to interact with Google Drive to try out various read and write actions on the drive that could be leveraged for various use cases.

API Doc

Google Drive API Doc

Google API Setup

Like many connectors, the setup outside of Tulip is the hardest part of integrating. Check out this video guide walking through the process of creating a Google API Project, credentials, and bringing them into the Google Drive Library Plugin.

Pre-Requisites

  1. Create an account on Google's cloud Console & configure the OAuth 2.0 credentials. More information can be found in Google's API docs.
  2. Activate the Google Drive API in the Google API Console.

Tulip Connection Details

The following information would need to be configured on Tulip's connectors.

  1. Running On: Cloud Connector Host
  2. Host:www.googleapis.com
  3. Port:443
  4. TLS: Yes
  5. Scopes that need to be configured in the connector:

Connector Functions

Get All Drive Files

Purpose

This connector will fetch all the files existing in a user's google drive.

Endpoint

HTTP GET call to the endpoint https://www.googleapis.com:443/drive/v3/files?fields=*

Required Input

No Inputs required

Required Output Extractor

  1. File Id: Unique identifier of the File which will be used to carry out the other tasks
  2. File Name: The File Name of the File
  3. Additional parameters that are returned with the response can be included as part of the output parameters

Get Specific File Metadata

Purpose

This connector will fetch the metadata of a file existing in the drive.

Endpoint

HTTP GET call to the endpoint - https://www.googleapis.com:443/drive/v3/files/{FileID}?fields=*

Required Input

The following are the URL parameters that are to be passed

  1. File Id

Required Output Extractor

  1. File Id: Unique identifier of the File which will be used to carry out the other tasks
  2. File Name: The File Name of the File
  3. Additional parameters that are returned with the response can be included as part of the output parameters

Create New File

Purpose

  1. Users can pass a Filename with file extension and description as an input & Tulip will create a new file with filename provided. The response of the API will be the metadata and various properties of the file.
  2. Information that is pulled from Google Drive V3 API can be further used either within Tulip apps, Tulip tables, or Tulip variables which would be piped into other connector functions. This information can also be used with other Google connectors.

Endpoint

HTTP POST call to the endpoint https://www.googleapis.com:443/drive/v3/files  
Required Input

Required Input

The following are the parameters that are sent as the Request Body

  1. File Name - The File Title with extension
  2. Description - Description of the File

Required Output Extractor

  1. File Id: Unique identifier of the File which will be used to carry out the other tasks
  2. File Name: The File Name of the File
  3. Additional parameters that are returned with the response can be included as part of the output parameters

Delete File

Purpose

  1. Users can pass File ID as input & Tulip will delete the file in the drive.

Endpoint

HTTP DELETE call to the endpoint - https://www.googleapis.com:443/drive/v3/files

Required Input

The following are the parameters that are sent as the request Body

  1. File ID

Required Output Extractor

No Outputs are extracted as it returns an empty response.


Was this article helpful?