- Print
To download the app, visit: Library
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
- 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 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
- Create an account on Google's cloud Console & configure the OAuth 2.0 credentials. More information can be found in Google's API docs.
- 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.
- Running On: Cloud Connector Host
- Host:www.googleapis.com
- Port:443
- TLS: Yes
- Scopes that need to be configured in the connector:
- https://www.googleapis.com/auth/drive
- https://www.googleapis.com/auth/drive.file
- https://www.googleapis.com/auth/drive.metadata
- https://www.googleapis.com/auth/drive.appdata
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
- File Id: Unique identifier of the File which will be used to carry out the other tasks
- File Name: The File Name of the File
- 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
- File Id
Required Output Extractor
- File Id: Unique identifier of the File which will be used to carry out the other tasks
- File Name: The File Name of the File
- Additional parameters that are returned with the response can be included as part of the output parameters
Create New File
Purpose
- 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.
- 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
- File Name - The File Title with extension
- Description - Description of the File
Required Output Extractor
- File Id: Unique identifier of the File which will be used to carry out the other tasks
- File Name: The File Name of the File
- Additional parameters that are returned with the response can be included as part of the output parameters
Delete File
Purpose
- 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
- File ID
Required Output Extractor
No Outputs are extracted as it returns an empty response.