GoogleDrive
Overview
Google Drive node is the client to connect with Google Drive. The node helps in upload and download of a file from a folder within google drive.
Setup
Prerequisites
For GoogleDrive node to work properly, you need to have a Google cloud account and Service account credential file from Google cloud console. For more details refer service account keys.
Installation
To install the node from designer:
- Go to Add more nodes option on the palette section.
- Check for the GoogleDrive node and click install.
- Once installed, the designer is required to be restarted.
To install the node from CLI:
- Go to your project workspace where you can see your
package.json
file. - Run the below give npm command.
npm i @kumologica/kumologica-contrib-googledrive
Technical Details
Properties
- Folder Id (Required)
Unique Id of the folder in the drive. ifhttps://drive.google.com/drive/folders/1dyUEebJaFnWa3Z4n0BFMVAXQ7mfUH11g
, then the Folder ID would be1dyUEebJaFnWa3Z4n0BFMVAXQ7mfUH11g
. - File Name (Required)
Name of the file to upload or to download. The filename must have the extension. - Content (Required)
Content of the file to be uploaded. - Content Type (Required)
MIME type associated with content of the file. - Credential File (Required)
Service Account credential file generated from Google cloud console. This can be JSON or a PEM file. - Request Timeout (Required)
Timeout associated with client in milliseconds. Default timeout is 15000 milliseconds.
Note
512 mb is the minimum memory requirement for your AWS lambda deployment when using GoogleDrive node. The node currently supports service account based authentication only. The credential JSON file related to service account can be generated from google cloud console.
Supported Operations
- upload
Upload operation helps in uploading a document to a given folder in google drive. - download
Download operation helps in downloading a document from a given folder in google drive.
Throws
GoogleDrive node throws the following exception.
- GoogleDrive Client Failed
Returns
Payload will be overwritten by this node when using download operation. The output of the download operation is a buffer object. In order to access the downloaded content on the subsequent node you can use the following expression msg.payload
. None of the variables will be overwritten or enriched by this node.