The Google Drive component is a data component that allows users to connect to, and read files and folders within an existing Google Drive.
It can carry out the following tasks:
#Release Stage
Alpha
#Configuration
The component definition and tasks are defined in the definition.json and tasks.json files respectively.
#Setup
In order to communicate with Google, the following connection details need to be
provided. You may specify them directly in a pipeline recipe as key-value pairs
within the component's setup
block, or you can create a Connection from
the Integration Settings
page and reference the whole setup
as setup: ${connection.<my-connection-id>}
.
#Supported Tasks
#Read File
Read a file content and metadata from Google Drive.
Input | ID | Type | Description |
---|
Task ID (required) | task | string | TASK_READ_FILE |
File ID (required) | shared-link | string | Shared link of the file. You can get the shared link by right-clicking on the file and selecting Copy link . |
Output | ID | Type | Description |
---|
File | file | object | File in Google Drive. |
Output Objects in Read File
File
Field | Field ID | Type | Note |
---|
Content | content | string | Base64 encoded content of the binary file without the data:[MIME_TYPE];base64, prefix. Google Sheets will be exported as CSV, Google Docs as PDF, and Google Slides as PDF. If the file is not a Google file, the content will be the same as the original file. |
Created time | created-time | string | Time when the file was created. Format: YYYY-MM-DDTHH:MM:SSZ . |
ID | id | string | Unique ID of the file. |
MD5 checksum | md5-checksum | string | MD5 checksum of the file. This reflects every change made to the file on the server, even those not visible to the user. |
MIME type | mime-type | string | MIME type of the file. For example, application/pdf , text/csv , image/jpeg , etc. |
Modified time | modified-time | string | Time when the file was last modified. Format: YYYY-MM-DDTHH:MM:SSZ . |
Name | name | string | Name of the file. The file extension will be added automatically based on the exported MIME type. For example, Google Sheets will be exported as CSV, Google Docs as PDF, and Google Slides as PDF. If the file is a Google Sheet and the name is MySheet , the exported file will be MySheet.csv . If the file is not a Google file, the name will be used as is. |
Size | size | integer | Size of the file in bytes. |
Version | version | integer | Version of the file in Google Drive. |
Web Content Link | web-content-link | string | Link for downloading the content of the file in a browser. |
Web View Link | web-view-link | string | Link for opening the file in a relevant Google editor or viewer in a browser. Usually, web view link is same as shared link. |
#Read Folder
Read metadata and content of files under the specified folder in Google Drive.
Input | ID | Type | Description |
---|
Task ID (required) | task | string | TASK_READ_FOLDER |
File ID (required) | shared-link | string | Shared link of the file. You can get the shared link by right-clicking on the file and selecting Copy link . |
Read Content | read-content | boolean | Whether to read the content of the files under the folder. |
Output | ID | Type | Description |
---|
Files | files | array[object] | List of files under the specified folder. |
Output Objects in Read Folder
Files
Field | Field ID | Type | Note |
---|
Content | content | string | Base64 encoded content of the binary file without the data:[MIME_TYPE];base64, prefix. Google Sheets will be exported as CSV, Google Docs as PDF, and Google Slides as PDF. If the file is not a Google file, the content will be the same as the original file. |
Created time | created-time | string | Time when the file was created. Format: YYYY-MM-DDTHH:MM:SSZ . |
ID | id | string | Unique ID of the file. |
MD5 checksum | md5-checksum | string | MD5 checksum of the file. This reflects every change made to the file on the server, even those not visible to the user. |
MIME type | mime-type | string | MIME type of the file. For example, application/pdf , text/csv , image/jpeg , etc. |
Modified time | modified-time | string | Time when the file was last modified. Format: YYYY-MM-DDTHH:MM:SSZ . |
Name | name | string | Name of the file. The file extension will be added automatically based on the exported MIME type. For example, Google Sheets will be exported as CSV, Google Docs as PDF, and Google Slides as PDF. If the file is a Google Sheet and the name is MySheet , the exported file will be MySheet.csv . If the file is not a Google file, the name will be used as is. |
Size | size | integer | Size of the file in bytes. |
Version | version | integer | Version of the file in Google Drive. |
Web Content Link | web-content-link | string | Link for downloading the content of the file in a browser. |
Web View Link | web-view-link | string | Link for opening the file in a relevant Google editor or viewer in a browser. Usually, web view link is same as shared link. |